3 ms·
> getopt is discouraged, getopts doesn't support long options Hold up. The only version of getopt with long option support is from util-linux, which fixes all
by arthur2e5 6y ago
> getopt is discouraged, getopts doesn't support long options
Hold up. The only version of getopt with long option support is from util-linux, which fixes all the whitespace issues people were discouraging getopt for. So what's the stated goal of this project again?
Heck, you don't even need to write code to detect usage of legacy getopt. It will panic every time you use the new stuff once it sees the option to turn on escaping.
Advertise all your cool features like argument types and help generation, but not this. I don't see how writing m4 is easier than just a while-case loop, but I may try it for the extra features.
- sjburt 6y agoGetopt isn't a builtin and the BSD/OSX one is different.