[getopt-sig] Comparing option libraries
Matthias Urlichs
smurf@noris.de
Thu, 28 Feb 2002 10:05:04 +0100
Hi,
Greg Ward:
> Eg. in Optik, you might have one Option to increment the 'verbose'
> variable ("-vvv"), another Option to set it to a specific value
> ("--verbose=3")
That's a nice case for optional option arguments. ;-)
So -v3 or --verbose=3 sets verbosity to 3, but a single -v or --verbose
increments it.
I don't think that remembering two options for effectively doing the same
thing would be in any way better.
> exec something_else --this --that $*
>
Should be
exec something_else --this --that "$@"
Yes, the quotes are part of the command line and NOT a mistake.
This is not a problem with shell scripts -- the real problems start when
you try to _parse_ the arguments in the shell.
> [ Calling implementation-detail methods to find out the
> value of an option ]
> ? Yuck.
I think I agree here.
--
Matthias Urlichs | noris network AG | http://smurf.noris.de/
--
A child is a person who can't understand why someone would give away a
perfectly good kitten.
-- Doug Larson