Re: Feature requests: dependencies between option values; description of option values
Lorenzo Bettini <[email protected]> Sun, 24 Feb 2008 21:30:58 +0100
| Newsgroups | gmane.comp.gnu.gengetopt.general |
|---|---|
| Message-ID | <[email protected]> |
nlohmann wrote: > Hello! > > I really like gengetopt, but I miss one feature to actually use it in a tool > of mine. Hi Niels! glad you like gengetopt :-) I also received your previous bug report and will work on that. see the other following comments (I assume you're already using the most recent version 2.22, right?) > > GNU BPEL2oWFN can be run in a whole different modes. I use one option > "--mode" to chose one of this modes, e.g. "--mode=net". Additionally, there > are a lot of parameters, currently invoked via "--parameter", e.g. > "--parameter=reduce". gengetopt now supports mode options (http://www.gnu.org/software/gengetopt/gengetopt.html#Mode-options) but I don't think this would solve your problem. I'll try to see what I can do for your request. > > Now I miss two features in gengetopt: > > 1. I would like to make certain parameters dependend on the mode chosen. For > example, parameter "reduce" should only be valid together with mode "net". > As far as I understand, I currently can only express dependence between > whole options, but not between their chosen values. > see above > 2. I would like to add descriptions not only to the option itself, but also > to the valid values. I know I could do this with "text" insertions, I like > the way gengetopt does all the wrapping and layout of the help output. > with text insertions could you achieve your goal? or am I missing something? otherwise what syntax (and what help output) would you suggest? > I know I could solve my problems by giving each mode value a single option, > e.g. "--net" or "--small", but I don't want to change the set of command > line parameters just because switching to gengetopt. > > I hope you can help me. Again, great tool! thanks! hope to hear from you soon cheers Lorenzo -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com http://www.myspace.com/supertrouperabba BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com http://www.gnu.org/software/src-highlite http://www.gnu.org/software/gengetopt http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net