Closed eode closed 8 months ago
As a workaround (not a fix), pressing <- (left arrow key) when inside of moar
will get you line numbers.
Obvious to me because I wrote it, not sure how obvious it is for anybody else :).
Even if I agree your request makes sense, AFAICT flag
from the standard library (which is what I'm using for command line parsing) doesn't support what you're after.
And adding a separate -linenumbers
option wouldn't work either, because flag
hides from me the order in which the command line arguments showed up.
So it seems this would involve quite some work, including replacing the command line parser.
How do you feel about the press-left-arrow-key solution / workaround?
Another (not super great) workaround is to specify --no-linenumbers=false
.
Ah, yeah.. I know the 'underlying lib doesn't support this' problem. :-)
It's not such an issue that I'd do a rework to change an underlying lib if it were my tool. Switching line numbers on and off with the hotkey works well enough for me.
As far as I'm concerned, you can close this.
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:
xxxx
versions of allno-xxxx
flagsSo that if
moar
is aliased to, for example,moar -no-linenumbers
, then it's simple enough to just typemoar -linenumbers
and get linenumbers -- though the underlying command moar is receiving ismoar -no-linenumbers -linenumbers
I think this is an elegant solution because:
Thanks for making the world moar nice. Before if found this program, I had less.