[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[help-gengetopt] Groups and other wishes
From: |
Jens Jakobsen |
Subject: |
[help-gengetopt] Groups and other wishes |
Date: |
Sun, 29 Jun 2003 19:38:12 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3.1) Gecko/20030425 |
Hi Lorenzo and everybody else,
I see that there is a discussion on groups going on. I have a few ideas
for the next generations of gengetopt, which in some respects relate
to the group concept.
With the current group concept it is possible to define groups of
options which are mutually exclusive. This is OK, but I have another
group concept which I instead will refer to as subsections.
*** Subsections ***
The idea of subsections is that you can have multiple options which
each has suboptions. Consider an animal simulation program, which allow
simulation of multiple animals with different characteristica:
animalsimulator --location Madrid --size 10000 --animal cat { -- tale 1
--legs 4 --wings 0} --animal chicken {--tale 0 --legs 2 --wings 2}
Corresponding configuration file would be:
#Normal options
location Madrid
size 10000
#First subsection
animal cat {
tale 1
legs 4
wings 0
}
#Second subsection
animal chicken {
tale 0
legs 2
wings 2
}
Of cause in the spirit of GNU subsections should be allowed to be
recursive.
*** Flag options ***
With the introduction of configuration files I sometimes find myself in
the situation where a flag is turned
on in the configuration file, but I wish to turn it off again on the
command line. This is not possible with the current setup.
Maybe it would be possible to have the flag options followed by an
optional on/off argument. In this way it would be possible to
explicitly set the option on or off: <--flag> [on|off]. Default
behaviour should be the same as it currently is.
*** Default filename ***
With gengetopt the output filename defaults to cmdline.h and cmdline.c.
I find this a little unpractical, and would prefer to have the output filename
default to <input_filename>.h and <input_filename>.c, where the input filename
is given as <input_filename>.ggo. With --file-name it should still be possible
to override the default behaviour.
kind regards,
Jens
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [help-gengetopt] Groups and other wishes,
Jens Jakobsen <=