(copied from stackoverflow.com)

See following example:

[STEP 101] $ cat foo.ksh
optstr="[-][=100:color]:?[COLOR:=auto]{[auto?Auto][never?Never][always?Always]}"
getopts "$optstr" opt
[STEP 102] $ ksh foo.ksh --man
SYNOPSIS
  foo.ksh [ options ]

OPTIONS
  --color[=COLOR]
                    auto  Auto
                    never Never
                    always
                          Always
                  The option value may be omitted. The default value is
auto.
[STEP 103] $ ksh foo.ksh --color=always
foo.ksh: --color: always: unknown option argument value
[STEP 104] $ ksh --version
  version         sh (AT&T Research) 93u+ 2012-08-01
[STEP 105] $

The foo.ksh --man output indicates that it should support --color=always
but the foo.ksh --color=always reported error. Any idea?

-clark
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to