Conditions | |
---|---|
ambiguous-option-name-error | inherits from getopt-error |
getopt-error | inherits from diagnostic-message |
missing-option-argument-error | inherits from getopt-error |
superfluous-option-argument-error | inherits from getopt-error |
unknown-option-name-error | inherits from getopt-error |
Classes | |
---|---|
getopt |
Methods | |
---|---|
optarg | getopt |
opterr | getopt |
optind | getopt |
optopt | getopt |
remaining-arguments | getopt |
unprocessed-arguments | getopt |
Functions | |
---|---|
getopt | self |
make-getopt | spec &rest init-arguments |
show-help-hint-and-die | self |
getopt-error | inherits from diagnostic-message | [Condition] |
Base class for all `getopt' errors. Initial argument OPTION-NAME is the name of the option raising the condition, or nil.
unknown-option-name-error | inherits from getopt-error | [Condition] |
Condition for an unknown option name. The default format control takes one argument, the name of the option.
ambiguous-option-name-error | inherits from getopt-error | [Condition] |
Condition for an ambiguous option name. The default format control takes one argument, the name of the option.
missing-option-argument-error | inherits from getopt-error | [Condition] |
Condition for a missing option argument. The default format control takes one argument, the name of the option.
superfluous-option-argument-error | inherits from getopt-error | [Condition] |
Condition for a superfluous option argument. The default format control takes one argument, the name of the option.
Class for parsing program arguments. Initial argument ORDERING defines how to handle options following operands, that is non-option arguments. If value is :permute, arguments are reordered during parsing so that all operands are at the end. This is the default. If value is :require the first operand terminates options processing and all remaining arguments are treated as operands. This is the default if the environment variable POSIXLY_CORRECT or _POSIX_OPTION_ORDER is set. Initial argument HELP defines the program argument to print the help text. This is used by the `show-help-hint-and-die' function.
Returns and (with setf) changes the remaining-arguments of the specified getopt
Returns and (with setf) changes the unprocessed-arguments of the specified getopt
Create an option parser object. First argument SPEC is an options specification. Remaining arguments are `getopt' initial arguments. Return value is an option parser object. * Options Specification An options specification is a list where each element describes an option. Slot NAMES is a list of option names. Characters denote short options and strings denote long options. Slot KEY is the value returned by `getopt' when it encounters this option. If nil, `getopt' returns the matching option name. This is the default. Slot ARGUMENT defines whether or not the option has an argument. Value is either :no, :optional, or :required. Default is :no. Slot ACTION defines an alternative procedure for `getopt' when it encounters this option. If value is a symbol, set it to the supplied option argument (a string) iff the option takes an argument. If an optional argument is omitted, set the symbol to nil. If the option does not take an argument, set the symbol to t. If ACTION's value is a function, call it with two arguments. First argument is the value of the KEY (see above) and the second argument is the symbol value as described previously.