cmdline lists the Options -? and -help per default but
they doesn't work with the dash.
Example Script:
#!/bin/sh
#\
exec tclsh "$0" "$@"
#
package require cmdline
#
set options {
{h "print this message"}
}
#
# set usage string
set usage ": name \[options\] \[value\]"
#
# parse commandline arguments into array
array set cmdopt [::cmdline::getoptions argv $options
$usage]
#
#EoF
Gives errors:
./example_script.tcl -?
./example_script.tcl -help
Works as expected:
./example_script.tcl ?
./example_script.tcl help
|