Tcl Library Source Code

View Ticket
Login
Ticket UUID: 1473699
Title: -? and -help broken
Type: Bug Version: None
Submitter: nobody Created on: 2006-04-20 17:04:07
Subsystem: cmdline Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Open Last Modified: 2006-04-20 17:04:07
Resolution: None Closed By:
    Closed on:
Description:
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