Skip to content

args/normalize breaks quoted arguments #3

@briceburg

Description

@briceburg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions