l3nz / cli-matic

Compact, hands-free [sub]command line parsing library for Clojure.
Eclipse Public License 2.0
360 stars 28 forks source link

[Ftr] Allow flags to be true when the value is not specified #132

Open bkmeneguello opened 3 years ago

bkmeneguello commented 3 years ago

Is your feature request related to a problem? Please describe. Boolean flags should not require a value, this is very nonstandard in relation to other CLI

Describe the solution you'd like I want a flag to be considered true if it's present, so xxx --flag should be true instead of xxx --flag=Y

Describe alternatives you've considered My workaround to this feature is to use :with-flag but this creates the [no-]flag alternatives which pollute my options, since false is the default.

bkmeneguello commented 3 years ago

For example, I need to create a pass-through CLI to parse kubectl options, it must be able to replace the original executable (a wapper), but :flag options do not work the same way