Skip to content

Commit

Permalink
quote args with spaces, that if passed as singl arg, they were unquot…
Browse files Browse the repository at this point in the history
…ed by the shell
  • Loading branch information
nyxnor committed Nov 1, 2022
1 parent d4c1548 commit 9f8fa80
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion usr/bin/scurl-download
Expand Up @@ -14,7 +14,11 @@ for res in "$@"; do
# exclude arguments from options
if [ "$skip_next" = "1" ]; then
skip_next=0
opt="$opt $res"
if echo "$res" | grep -F " "; then
opt="$opt \"$res\""
else
opt="$opt $res"
fi
continue
fi
# exclude options that require arguments
Expand Down

0 comments on commit 9f8fa80

Please sign in to comment.