Skip to content

Commit

Permalink
Merge pull request #22 from wader/sh-quote-parens
Browse files Browse the repository at this point in the history
Quote also if string includes ()
  • Loading branch information
wader authored Nov 14, 2024
2 parents 7336c71 + ebe70c6 commit d934fb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jqjq.jq
Original file line number Diff line number Diff line change
Expand Up @@ -2737,7 +2737,7 @@ def parse_options:
def invoke_client_jqjq:
# instead of @sh to not always quote
def sh_escape:
if . == "" or test("['\" $\n\\\\]") then
if . == "" or test("['\" $\n\\\\()]") then
"'" + gsub("'"; "'\\''") + "'"
end;
( . as $args
Expand Down

0 comments on commit d934fb6

Please sign in to comment.