[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-gengetopt] Help on usage or feature request: default mode
From: |
Lorenzo Bettini |
Subject: |
Re: [help-gengetopt] Help on usage or feature request: default mode |
Date: |
Mon, 17 Nov 2008 20:54:53 +0100 |
User-agent: |
Thunderbird 2.0.0.17 (X11/20080925) |
Kay-Michael Wuerzner wrote:
Hi,
mode options are a great extension to gengetopt. Many thanks for
integrating this feature.
Hi there
happy you like the new features :-)
1. Is there a possibilty to define a 'default mode'?
actually I hadn't thought about that, but you're right: we need a
default mode, let me think about this feature
I tried the following specification (I skipped some options for
reasons of readability):
defmode "moot tagger"
modeoption "ta-moot" - "Use moot tagger"
flag on mode="moot tagger"
modeoption "ta-moot-model" - "Language model for moot"
string typestr="FILE ()" mode="moot tagger" required
defmode "tree tagger"
modeoption "ta-tree" - "Use tree tagger"
flag off mode="tree tagger"
modeoption "ta-tree-model" - "Language model for moot"
string typestr="FILE ()" mode="tree tagger" required
I would expect the program to give an error message (dummy:
'--ta-moot-model' option required), if run without any option. But no
errors are reported. Is there any workaround?
2. Is it possible to nest groups and modes? E.g. I would like to have
modes for some aspects of my program. I can implement flags using a
combination of the 'values' and the 'dependon' 'keyword. But I do not
see how more complex arguments like those above could depend on
previously set arguments.
mh... shouldn't it be already like that?
Doesn't it work to nest group inside modes?
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