Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Options): values using delimiters no longer parse additional valu…
…es after a trailing space Imagine two args, an option `-o` which accepts mutliple values, and a positional arg `<file>`. Prior to this change the following (incorrect) parses would have happened: ``` $ prog -o 1,2 some.txt o = 1, 2, file file = ``` Only when delimters are used, spaces stop parsing values for the option. The follow are now correct ``` $ prog -o 1,2 some.txt o = 1, 2 file = some.txt $ prog some.txt -o 1 2 o = 1, 2 file = some.txt ``` This still has the bi-product of: ``` $ prog -o 1 2 some.txt o = 1, 2, some.txt file = ``` This is simply a CLI design and documentation issue (i.e. don't allow options with unlimited multiple values with positionaln args, or clearly document that positional args go first). This will also be helped by the upcoming `Arg::require_delimiter` Relates to #546
- Loading branch information