| Joel Uckelman on Mon, 3 Jan 2005 20:00:22 -0600 (CST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| [nimh-dev] options and getopt |
How do we want to handle options? nmh commands take options with single hyphens, e.g. '-reverse'. Unfortunately, getopt interprets this as bundled short options, so '-reverse', '-eeerrsv', and '-r -e -v -e -r -s -e' are all equivalent. I think we have three options (heh!): 1. Switch to long options, e.g. '--reverse'. We can use getopt, but this breaks compatibility with nmh. 2. Write our own option parser. This maintains nmh compatibility, but keeps us using a wierd non-standard option format and makes us write more code. 3. Use getopt, but check for anagrams. This would work so long as no two distince options for the same command are anagrams of each other. (Yech!) _______________________________________________ nimh-dev mailing list nimh-dev@xxxxxxxxxxx http://lists.ellipsis.cx/mailman/listinfo/nimh-dev