2010/8/18 Alexander Teinum <atei...@gmail.com>: > I’d like to write a KISS option parser that accepts “program -c -a -f > some_file”, but not “program -ca -fsome_file”. I prefer to keep the > rules simple.
Such a simple option set probably doesn't actually *need* a parser. I don't think any lines would be freed up in dmenu. You'd just add code. It's got a for loop and a list of strcmps, plus usage(), which could be done with a goto but I wasn't sure if that's "suckless". It's really the simplest implementation out there. > Is it okay to use three dots in the usage text? (See echo’s man page.) > I think it means that you can repeat what’s before the three dots. I think "files..." means 1 or more file, and "[files]..." means 0 or more. > How do you feel about sorting the options? Should it always be done? I think it should be in the order the programmer gives them. Some options may be more important, for example. cls