Closed DavidIAm closed 5 years ago
i'm not sure whether there is an issue here.. to avoid ambiguity you use --option=value
notation as documented here.
E.g.
$ /thing/like/a/shell --colour="--instance dog"
--option=value
notation is not available for short options, so this will not work:
$ /thing/like/a/shell -c="--instance dog"
There is a constraint in which this ambiguity becomes problematic in this case however - the 'you are invoking a shell' api uses
At the very least, being crystal clear about constructs that are impossible 'if you need to do this, just forget about using THIS module to parse your options', I guess?
The short option notation in this lib is inspired mostly by getopt. Getopt doesn't have an --option=value
style of notation, it would parse the value as =--instance dog
(keeping the =
).
$ getopt c: -c="--instance dog"
-c =--instance dog --
Passing a "set of commands for the shell" is a common use case, take a look at Terminate parsing with a double hypen.
Found a parsing thing that doesn't work - it seems to get confused about having a space within a particular argv and mis-matches value?
I was trying to do somethin glike
/thing/like/a/shell -c "--instance dog"
And encountered this result.
Probably some small oversight...