commander-cli icon indicating copy to clipboard operation
commander-cli copied to clipboard

option combined with value

Open BebeSparkelSparkel opened this issue 5 years ago • 4 comments

Some options are easier to use if the option is combined with the value like the sed option -i[extension].

Other CLIs use the assignment operator like HandBrakeCLI with the option -v, --verbose[=number] Be verbose (optional argument: logging level)

BebeSparkelSparkel avatar Dec 18 '20 13:12 BebeSparkelSparkel

Yeah, I guess the assignment operator could do the trick here. I feel similarly to this as I do to combined flags.

SamuelSchlesinger avatar Dec 27 '20 21:12 SamuelSchlesinger

I don't want to limit it to an assignment operator. Just matching a prefix key to the value is what I would suggest.

optJoined @"prefix" would drop "prefix" from the text "prefix1234" and then try to unrender the remaining text "1234"

BebeSparkelSparkel avatar Dec 27 '20 21:12 BebeSparkelSparkel

Yeah, that's even better. PRs welcome, yet again!

SamuelSchlesinger avatar Dec 27 '20 21:12 SamuelSchlesinger

I'll wait until you review the other PRs

BebeSparkelSparkel avatar Dec 30 '20 16:12 BebeSparkelSparkel