News for hackers. Stuff that matters.
Re:Bash code generator for command-line arguments by arthur2e5 on Friday October 02, 2020 @08:51AM (#24662049)
> 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.

Re:Bash code generator for command-line arguments by sjburt on Friday October 02, 2020 @12:05PM (#24664005)
Getopt isn't a builtin and the BSD/OSX one is different.