moar
moar copied to clipboard
Allow inversion of no-xxx flags.
Sometimes, as with line numbering in my case, i want line numbering off by default, but to add it when needed.
Turning it off by default is simple enough, but turning it back on isn't easily apparent.
What I'd like:
- accept
xxxx
versions of allno-xxxx
flags - last argument wins
So that if moar
is aliased to, for example, moar -no-linenumbers
, then it's simple enough to just type moar -linenumbers
and get linenumbers -- though the underlying command moar is receiving is moar -no-linenumbers -linenumbers
I think this is an elegant solution because:
- it doesn't interfere with any defaults or user expectations
- it is a common enough design pattern to be easily intuited
Thanks for making the world moar nice. Before if found this program, I had less.