You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
triple thumbs up for long options but for us who use moar (or any other program) in bash scripts putting three long (no status bar, continuation glyph, continuation glyph color) options means an extra line or worse an extra variable to hold the options.
The text was updated successfully, but these errors were encountered:
I agree in principle, and I vaguely recall looking into alternatives to Go's standard library flag handling (which is what I'm using now) for this very reason.
As I recall:
The alternatives I found didn't come with enum support, (think --statusbar={inverse|plain|bold})
I felt that the alternatives I found were wonky to switch to
So I gave up. While not great, I think the current options handling works well enough.
What all this means is that:
I'm not interested in spending any more time on this myself
I am willing to accept PRs if somebody else does the work
I found this blog post regarding flags in Go: Short and Long Options with Go flag standard package. While the lack of short flags is annoying, the fact that the help screen showed that all flags have single dashes was very confusing since they're usually only used on short flags.
Turns out these two things are related, and single dashes are accepted precisely because they emulate the behavior or short flags, meaning the way to handle short and long flags with the standard library is to define separate flags that share a pointer where one is short and the other is long. This allows for using double dashes on short flags and single dashes on long flags, and the way to deal with this is just to give a custom usage screen that only shows single dashes with short flags and double dashes with long flags.
triple thumbs up for long options but for us who use moar (or any other program) in bash scripts putting three long (no status bar, continuation glyph, continuation glyph color) options means an extra line or worse an extra variable to hold the options.
The text was updated successfully, but these errors were encountered: