-
and -words
as a cmdArgument instead of cmdShortOption or cmdLongOption when using the parseopt module?what does program -shortopt --longopt cmdarg1 -cmdarg2 give?
we could define -- as a separator if needed (grep uses -e for that IIRC)
So that was maybe an abstract example. My real world example is I have a program that renames files by swapping "this" arguments with "that" arguments.
[args] this[ that]
So a scenario where the user want to swap dashes "-" with underlines "_" in filenames recursively might run the program like:
replace -r - _
However the "-" is picked up as an option not an argument by the arg parser.