Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-getopt Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Sun May 15 03:49:39 2022 GMT+0.
• Introduction | What cl-getopt is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
cl-getopt is a Common Lisp CFFI wrapper to the libc utility "getopt_long". See example.lisp for an example SBCL script using this library. To run the example, follow the instructions at the top of the script to install it and then run ./example.lisp with whatever options you want to see. Note that for old systems /usr/bin/env won't support the "-S" option which makes it difficult to pass arguments to sbcl as a script. In this case you are probably already familiar with how to run Lisp scripts in some other way, but if you're not then the general rule is to create an ordinary shell script and call SBCL with whatever arguments you like rather than exploiting the hash-bang script syntax. There is an "install" target in the Makefile if you want to place the cl-getopt SBCL core file somewhere it will be useful for other scripts, e.g. genpass (https://www.github.com/ghollisjr/genpass). cl-getopt is in the public domain.
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The cl-getopt system |
Gary Hollis
Public Domain
CFFI wrapper to the libc getopt_long function
cffi-grovel
cffi
cl-getopt.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The cl-getopt.asd file | ||
• The cl-getopt/package.lisp file | ||
• The cl-getopt/grovel.lisp file | ||
• The cl-getopt/cl-getopt.lisp file |
Next: The cl-getopt/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
cl-getopt.asd
cl-getopt (system)
Next: The cl-getopt/grovel․lisp file, Previous: The cl-getopt․asd file, Up: Lisp files [Contents][Index]
Next: The cl-getopt/cl-getopt․lisp file, Previous: The cl-getopt/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
cl-getopt (system)
grovel.lisp
Previous: The cl-getopt/grovel․lisp file, Up: Lisp files [Contents][Index]
grovel.lisp (file)
cl-getopt (system)
cl-getopt.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The cl-getopt package |
package.lisp (file)
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported functions |
Previous: Exported definitions, Up: Exported definitions [Contents][Index]
Returns the values
* option-values
* remaining-arguments
given the list of input arguments and options specification.
option-values is hash-table of the short or long argument name
string (short if present) and the list of all supplied values of that
option in the order they were given. remaining-arguments is a list of
the remaining arguments after processing the options.
Note that if no argument is supplied to an option, whether because the
argspec is :none or :optional, there will still be a list of NIL
elements for each time the option was supplied without an argument.
When the argspec is :required, some kind of value must be in the
argument list for each time that option was supplied.
options should be a list of plists, each plist of the form (&key long
short argspec description) where
* long is a symbol, string or character naming the long argument name.
* short is a symbol, string or character naming the short argument name.
* argspec is one of the values :none, :required, :optional.
* description is a string to be used in an automatically generated argument description message.
command-arg-present-p should be T whenever the argument list includes
the command as the first element, and NIL when it’s not included. For
general scripting use it should be present, but this option is
included to allow easier use of getopt for parsing argument lists
without the command being present.
cl-getopt.lisp (file)
Generates a description string for the list of options supplied.
column-width controls the width in characters of each option column. column-minspace controls the minimum space to pad between columns.
cl-getopt.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal constants | ||
• Internal symbol macros | ||
• Internal macros | ||
• Internal functions | ||
• Internal classes |
Next: Internal symbol macros, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-getopt-20211209-git/grovel.processed-grovel-file
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-getopt-20211209-git/grovel.processed-grovel-file
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-getopt-20211209-git/grovel.processed-grovel-file
Next: Internal macros, Previous: Internal constants, Up: Internal definitions [Contents][Index]
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-getopt-20211209-git/grovel.processed-grovel-file
(cl-getopt::%var-accessor-+optarg+)
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-getopt-20211209-git/grovel.processed-grovel-file
(cl-getopt::%var-accessor-+opterr+)
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-getopt-20211209-git/grovel.processed-grovel-file
(cl-getopt::%var-accessor-+optind+)
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-getopt-20211209-git/grovel.processed-grovel-file
(cl-getopt::%var-accessor-+optopt+)
Next: Internal functions, Previous: Internal symbol macros, Up: Internal definitions [Contents][Index]
Converts a Lisp list of strings denoting the arguments supplied to
a command into two values:
* argc: number of argument strings
* argv: array of argument strings
These are bound to the symbols supplied in the (argc argv) list.
cl-getopt.lisp (file)
cl-getopt.lisp (file)
cl-getopt.lisp (file)
Next: Internal classes, Previous: Internal macros, Up: Internal definitions [Contents][Index]
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-getopt-20211209-git/grovel.processed-grovel-file
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-getopt-20211209-git/grovel.processed-grovel-file
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-getopt-20211209-git/grovel.processed-grovel-file
/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/cl-getopt-20211209-git/grovel.processed-grovel-file
cl-getopt.lisp (file)
cl-getopt.lisp (file)
cl-getopt.lisp (file)
cl-getopt.lisp (file)
cl-getopt.lisp (file)
cl-getopt.lisp (file)
Previous: Internal functions, Up: Internal definitions [Contents][Index]
cl-getopt.lisp (file)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | C F L |
---|
Jump to: | C F L |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | %
(
-
C F G M O S W |
---|
Jump to: | %
(
-
C F G M O S W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | +
C S |
---|
Jump to: | +
C S |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C O P S |
---|
Jump to: | C O P S |
---|