After writing hand-crafted command line option parsers, then switching to getopt(), then popt, and sometimes libconfuse I have a sack full of dissatisfaction and nearly an aversion to writing easy-to-use command line tools.
However, GNU gengetopt changed all that:
- it's easy to use with a powerful grammar that covers nearly all use cases
- it's portable because it's just a code generator and the C code produced is highly portable
- it doesn't clutter your binaries with disgusting dependencies in your binaries (ever needed a static libpopt because you love static linking?)
- it's maintained and it's GNU so I guess it will be around for at least a little while
Beside all the praise I want to utter some criticism as well: I found myself doing ugly hacks to incorporate a licence string upon --version, and custom multi-line usage strings are not really well supported either. But that might change in the future, Lorenzo Bettini, the current maintainer, is open for discussions and contributions.