Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

args/normalize breaks quoted arguments #3

Open
briceburg opened this issue Dec 2, 2016 · 0 comments
Open

args/normalize breaks quoted arguments #3

briceburg opened this issue Dec 2, 2016 · 0 comments

Comments

@briceburg
Copy link
Owner

single-string arguments that are quoted and have spaces are getting handled by the field separator and not left intact as a single argument.

E.g.

# below has 3 arguments
$ bin/command start -- abc "d e f" hij

...

#!/usr/bin/env bash
# bin/command 

for i in "$@"; do
  echo "$i"
done

set -- $(args/normalize "$@")

printf "\n\nafter args...\n\n"

for i in "$@"; do
  echo "$i"
done

output

abc
d e f
hij

after args

abc
d
e
f
hij

The output should be same after args/normalize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant