libre-man / unix-opts

Unix-style command line options parser
MIT License
107 stars 13 forks source link

Add quick support for POSIX double dash #3

Closed williamyaoh closed 7 years ago

williamyaoh commented 7 years ago

-- now signals start of operands.

The code here is only a quick bandaid, because an option with an argument right before the double dash will swallow the double dash. For example, <command> --grab-str -- --option will result in -- being the value of :grab-str and --option getting parsed as an option.

However, under normal use, the double dash code is useful.

mrkkrp commented 7 years ago

Thanks!