4 ms·
Congratulations! And never, ever, ever give up the fight for GNU-style double-dash command-line flags!
by squeed 10y ago
Congratulations!
And never, ever, ever give up the fight for GNU-style double-dash command-line flags!
- Touche 10y agoContext? Are people actually switching to single dash flags? If so I'll get my pitchfork out of the closet.
- squeed 10y agoThe default golang flag package (https://golang.org/pkg/flag/ https://golang.org/pkg/flag/) does not implement gnu-style long-with-shortcut options. Instead, one and two-dash arguments are identical. For example, -enable-pants and --enable-pants are equivalent. Compare this with the GNU style where you can have -p or --enable-pants. Most go programs I've read use spf13's flag library, which is GNU-compatible.
- Touche 10y agoIs this a remnant of Plan9 or something? Ugh, this is why I don't dabble in ecosystems with overly opinionated leaders. You have to know when to have a strong opinion and when to do things the standard way, and some people can't do that.
- 4ad 10y agoPlan 9 doesn't have --long-options at all. In Plan 9 arguments are single letter.
- f2f 10y agoNote that the std flag package accepts double-dashed arguments just fine, it only never advertises that it does.