This is the command-line-arguments Reference Manual, version 2.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:47:53 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
command-line-arguments
small library to deal with command-line arguments
Eric Schulte
Francois-Rene Rideau
MIT
A library to abstract away the parsing of Unix-style command-line arguments
2.0.0
pkgdcl.lisp
(file).
argv.lisp
(file).
parse.lisp
(file).
help.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
command-line-arguments/command-line-arguments.asd
command-line-arguments/pkgdcl.lisp
command-line-arguments/argv.lisp
command-line-arguments/parse.lisp
command-line-arguments/help.lisp
command-line-arguments/command-line-arguments.asd
command-line-arguments
(system).
command-line-arguments/pkgdcl.lisp
command-line-arguments
(system).
command-line-arguments/argv.lisp
pkgdcl.lisp
(file).
command-line-arguments
(system).
command-line-arity
(condition).
compute-and-process-command-line-options
(function).
get-command-line-arguments
(function).
handle-command-line
(function).
arguments
(reader method).
invoke-command-line-handler
(function).
name
(reader method).
positional-arity
(reader method).
rest-arity
(reader method).
command-line-arguments/parse.lisp
pkgdcl.lisp
(file).
command-line-arguments
(system).
*command-line-option-specification*
(special variable).
*command-line-options*
(special variable).
define-command
(macro).
process-command-line-options
(function).
actual-action-from-spec
(function).
coerce-option-parameter
(function).
command-line-action
(function).
command-line-option-specification
(function).
decompose-long-option-string
(function).
do-process-command-line-options
(function).
finalize-list
(function).
get-option-parameter
(function).
long-option-p
(function).
make-negated-names
(function).
make-option-action
(function).
negated-short-option-p
(function).
option-end-p
(function).
option-like-p
(function).
option-name
(function).
prepare-command-line-options-specification
(function).
process-long-option
(function).
process-option
(function).
process-short-option
(function).
short-option-p
(function).
command-line-arguments/help.lisp
pkgdcl.lisp
(file).
command-line-arguments
(system).
show-option-help
(function).
split-sequence
(function).
Packages are listed by definition order.
command-line-arguments
common-lisp
.
uiop/driver
.
*command-line-option-specification*
(special variable).
*command-line-options*
(special variable).
command-line-arity
(condition).
compute-and-process-command-line-options
(function).
define-command
(macro).
get-command-line-arguments
(function).
handle-command-line
(function).
process-command-line-options
(function).
show-option-help
(function).
actual-action-from-spec
(function).
arguments
(generic reader).
coerce-option-parameter
(function).
command-line-action
(function).
command-line-option-specification
(function).
decompose-long-option-string
(function).
do-process-command-line-options
(function).
finalize-list
(function).
get-option-parameter
(function).
invoke-command-line-handler
(function).
long-option-p
(function).
make-negated-names
(function).
make-option-action
(function).
name
(generic reader).
negated-short-option-p
(function).
option-end-p
(function).
option-like-p
(function).
option-name
(function).
positional-arity
(generic reader).
prepare-command-line-options-specification
(function).
process-long-option
(function).
process-option
(function).
process-short-option
(function).
rest-arity
(generic reader).
short-option-p
(function).
split-sequence
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
the (prepared) specification for how to parse command-line options
command-line options as parsed into a plist
Defines show-help-for-NAME, run-NAME, and NAME functions.
The ‘define-command’ macro may be used to simultaneously define the
following three functions which are useful for defining a function
which may be invoked from the command line. For example, the
following invocation of ‘define-command’ on FOO results in:
(define-command foo (noun verb &spec +command-line-spec+ &aux scratch)
"Usage: foo NOUN VERB [OPTIONS...]
Do VERB to NOUN according to OPTIONS."
#.(format nil "~%Built with ~a version ~a.~%"
(lisp-implementation-type)
(lisp-implementation-version))
(declare (verbose))
(when help (show-help-for-foo))
#|...implementation...|#)
show-help-for-FOO
: Prints help and option information for FOO to STDOUT.
The docstring passed to ‘define-command’ becomes the help text
printed before options. A second docstring passed as the fourth
argument to ‘define-command’ is printed after the options.
run-FOO
: This function is meant to be used as a ‘defsystem’ :ENTRY-POINT.
It runs FOO on the command line arguments by invoking
‘handle-command-line’.
FOO
: The &BODY passed to ‘define-command’ becomes the body of the FOO
function. The positional required command line arguments become
named arguments to FOO and the command line options passed in
behind the &SPEC keyword in the argument list become keyword
arguments to FOO.
The macro-expanded prototype for FOO in this example would be the
following (where all keyword arguments are option names from
+command-line-spec+).
(DEFUN FOO (NOUN VERB &KEY B CHECK VERBOSE WARN HELP VERSION &AUX SCRATCH))
SPECIFICATION is a list as described above.
COMMAND-LINE is the list of tokens to be parsed.
Return two values:
a list of alternating actions and values, and
a list of the arguments remaining after the various specified options.
Indicates the wrong number of arguments were given on the command line.
Given a STRING option argument and a TYPE of argument,
return the argument value as a Lisp object.
OPTION is the name of the option to which the argument is to be passed,
for the sake of error messages.
Remove all the options and values from *COMMAND-LINE-ARGUMENTS*. Process each option.
ARG is a string. Is it like –XXX ?
This is called for each option specification when preparing for parsing, and
computes the action function to call (with optional value if provided)
when the option is found on a command-line.
P is the hash-table of actions.
NAME is the first name of this option, a string or a character.
The keywords are option options for this option specification.
ARG is a string. Is it like +X ?
Given a SPECIFICATION, return a hash-table mapping
option names to a vector of
the action function to call when encountering the option,
the type of option arguments accepted, and
whether the option is optional.
ARG is a string. Is it like -X, but not – ?
command-line-arity
)) ¶command-line-arity
)) ¶command-line-arity
)) ¶command-line-arity
)) ¶Jump to: | A C D F G H I L M N O P R S |
---|
Jump to: | A C D F G H I L M N O P R S |
---|
Jump to: | *
A N P R S |
---|
Jump to: | *
A N P R S |
---|
Jump to: | A C F H P S |
---|
Jump to: | A C F H P S |
---|