getopts icon indicating copy to clipboard operation
getopts copied to clipboard

Support overridable options

Open clubby789 opened this issue 10 months ago • 0 comments
trafficstars

It would be useful to have a way to specify an option which uses its last occurrence as its value; e.g.

cmd --foo fizz --foo buzz
assert_eq!(matches.opt_str("foo"), Some("buzz"))

This is useful for tools which are passed automatically generated arguments which a user may wish to override by appending their own (motivated by https://github.com/rust-lang/rust/issues/133072)

clubby789 avatar Dec 27 '24 00:12 clubby789