crackpot idea: option parser that extracts the valid options from a usage string...
bun microsystems :labrysSickle: :labrysEstrogen: @emiliamicrosystems@brain.worm.pink
crackpot idea: option parser that extracts the valid options from a usage string in like "usage: foo [-abcefw] [-R dir] file ..." so that you don't have to duplicate that between your option parsing and your usage() function
like instead of getopt(argc, argv, "abcefR:w") you do getopt(argv, "[-abcefw] [-R dir] file ..."); and as a bonus it automatically prints that like "usage: %s %s", getprogname(), usagestr when an invalid option is encountered
this is probabl;y even worse than normal getopt
like instead of getopt(argc, argv, "abcefR:w") you do getopt(argv, "[-abcefw] [-R dir] file ..."); and as a bonus it automatically prints that like "usage: %s %s", getprogname(), usagestr when an invalid option is encountered
this is probabl;y even worse than normal getopt