Skip to content

Commit

Permalink
fix: don't break at spaces in option value
Browse files Browse the repository at this point in the history
  • Loading branch information
decipher3114 committed Dec 10, 2024
1 parent b555e8b commit fcc188a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/json/options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ editOptions() {
.values |
if (length != 0) then
(
if any(.[]; match("^[^ ]+").string == $CURRENT_VALUE) then
if any(.[]; match(".*(?= \\()").string == $CURRENT_VALUE) then
(
.[] |
if match("^[^ ]+").string == $CURRENT_VALUE then
if match(".*(?= \\()").string == $CURRENT_VALUE then
., "on"
else
., "off"
Expand Down Expand Up @@ -125,7 +125,7 @@ editOptions() {
continue
;;
esac
NEW_VALUE=${NEW_VALUE%% *}
NEW_VALUE=${NEW_VALUE%% (*}
if [ "$NEW_VALUE" == "Custom" ]; then
unset NEW_VALUE
fi
Expand Down

0 comments on commit fcc188a

Please sign in to comment.