This is the adopt-subcommands Reference Manual, version 0.2.2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:11:54 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
adopt-subcommands
Extend the Adopt command line processing library to handle nested subcommands.
Eric Timmons <eric@timmons.dev>
MIT
0.2.2
adopt
(system).
bobbin
(system).
split-sequence
(system).
uiop
(system).
adopt-subcommands.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
adopt-subcommands/adopt-subcommands.asd
adopt-subcommands
(system).
adopt-subcommands/adopt-subcommands.lisp
adopt-subcommands
(system).
add-subcommand
(function).
dispatch
(function).
folder-is-terminal
(condition).
folder-is-terminal-folder
(reader method).
folder-is-terminal-path
(reader method).
make-subcommand-folder
(function).
make-subcommand-terminal
(function).
print-help
(generic function).
print-help-and-exit
(generic function).
unknown-subcommand
(condition).
unknown-subcommand-folder
(reader method).
unknown-subcommand-key
(reader method).
unknown-subcommand-path
(reader method).
%function
(reader method).
(setf %function)
(writer method).
copy-hash-table
(function).
dispatch-subcommand
(generic function).
extend-path
(function).
hash-table-keys
(function).
interface
(reader method).
(setf interface)
(writer method).
key
(reader method).
(setf key)
(writer method).
key-from-name
(function).
merge-hts
(function).
path
(reader method).
(setf path)
(writer method).
plist-remove-keys
(function).
print-entry-options
(function).
print-path-help
(function).
signal-folder-is-terminal
(function).
signal-unknown-subcommand
(function).
subcommand
(class).
subcommand-error
(condition).
subcommand-folder
(class).
subcommand-folder-p
(function).
subcommand-path
(class).
subcommand-terminal
(class).
subcommand-terminal-p
(function).
subcommands
(reader method).
(setf subcommands)
(writer method).
Packages are listed by definition order.
adopt-subcommands
common-lisp
.
add-subcommand
(function).
dispatch
(function).
folder-is-terminal
(condition).
folder-is-terminal-folder
(generic reader).
folder-is-terminal-path
(generic reader).
make-subcommand-folder
(function).
make-subcommand-terminal
(function).
print-help
(generic function).
print-help-and-exit
(generic function).
unknown-subcommand
(condition).
unknown-subcommand-folder
(generic reader).
unknown-subcommand-key
(generic reader).
unknown-subcommand-path
(generic reader).
%function
(generic reader).
(setf %function)
(generic writer).
copy-hash-table
(function).
dispatch-subcommand
(generic function).
extend-path
(function).
hash-table-keys
(function).
interface
(generic reader).
(setf interface)
(generic writer).
key
(generic reader).
(setf key)
(generic writer).
key-from-name
(function).
merge-hts
(function).
path
(generic reader).
(setf path)
(generic writer).
plist-remove-keys
(function).
print-entry-options
(function).
print-path-help
(function).
signal-folder-is-terminal
(function).
signal-unknown-subcommand
(function).
subcommand
(class).
subcommand-error
(condition).
subcommand-folder
(class).
subcommand-folder-p
(function).
subcommand-path
(class).
subcommand-terminal
(class).
subcommand-terminal-p
(function).
subcommands
(generic reader).
(setf subcommands)
(generic writer).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Add a subcommand to a folder.
Given a subcommand UI (as returned by MAKE-SUBCOMMAND-FOLDER), dispatch
based on the provided ARGUMENTS.
If PRINT-HELP-AND-EXIT is provided, it must be a symbol denoting the option corresponding to your UI’s help flag. If provided and the help option is present in the command line, the help will be printed and the program will exit when a terminal node is reached.
Create and return a subcommand folder.
If this is placed into another folder, that folder uses ‘key‘ to determine when
to dispatch to this interface. If ‘key‘ is not specified, one is determined
automatically by splitting ‘name‘ on space characters and taking the last
entry.
When this subcommand is dispatched, ‘function‘ is called with a list of
remaining arguments, an ‘eql‘ hash table containing all the parsed options, a
path object representing all folders traversed (the path is currently only
useful for passing to the PRINT-HELP), and a thunk that continues processing
the subcommands when called. If not provided, the thunk is simply called.
The remaining arguments are passed directly to ‘adopt:make-interface‘.
Create and return a terminal subcommand interface.
The subcommand folder into which this is placed uses ‘key‘ to determine when to
dispatch to this interface. If ‘key‘ is not specified, one is determined
automatically by splitting ‘name‘ on space characters and taking the last
entry.
When this subcommand is dispatched, ‘function‘ is called with a list of remaining arguments, an ‘eql‘ hash table containing all the parsed options, and a path object representing all folders and terminal traversed (the path is currently only useful for passing to the PRINT-HELP). ‘function‘ is required.
The remaining arguments are passed directly to ‘adopt:make-interface‘.
folder-is-terminal
)) ¶folder-is-terminal
)) ¶path
.
A GF version of ADOPT:PRINT-HELP that additionally dispatches for the objects defined by this library.
subcommand-terminal
) &rest args) ¶subcommand-folder
) &rest args) ¶subcommand-path
) &rest args) ¶A GF version of ADOPT:PRINT-HELP-AND-EXIT that additionally dispatches for
the objects defined by this library.
Additionally, we use UIOP:QUIT since that works on more implementations than ADOPT:EXIT.
subcommand-error
) &rest keys) ¶unknown-subcommand
)) ¶unknown-subcommand
)) ¶key
.
unknown-subcommand
)) ¶path
.
Signals that no terminal subcommand was found
Signals that a subcommand could not be found.
Copy a hash table
Return a list of all keys in HT.
Generate a key from NAME by splitting on space and returning the last element.
Return a copy of EXISTING-HT with all key/value pairs from NEW-HT inserted into it.
Return a new plist that contains all keys and values from PLIST, excepting any key in KEYS.
Print the options for an interface in a path.
This code is mostly copied from Adopt. See LICENSE for more information.
Print the help for PATH. Prints the examples and usage information for the
most specific interface on the path. Prints the options for all interfaces on
the path.
This code is mostly copied from Adopt. See LICENSE for more information.
subcommand
)) ¶automatically generated reader method
subcommand
)) ¶automatically generated writer method
subcommand-folder
) &key arguments options path print-help-and-exit) ¶subcommand-terminal
) &key arguments options path print-help-and-exit) ¶subcommand
)) ¶automatically generated reader method
subcommand
)) ¶automatically generated writer method
subcommand
)) ¶automatically generated reader method
key
.
subcommand
)) ¶automatically generated writer method
key
.
subcommand-path
)) ¶automatically generated reader method
path
.
subcommand-path
)) ¶automatically generated writer method
path
.
subcommand-folder
)) ¶automatically generated reader method
subcommand-folder
)) ¶automatically generated writer method
error
.
(make-hash-table :test (quote equal))
Jump to: | %
(
A C D E F G H I K M P S U |
---|
Jump to: | %
(
A C D E F G H I K M P S U |
---|
Jump to: | F I K P S |
---|
Jump to: | F I K P S |
---|
Jump to: | A C F P S U |
---|
Jump to: | A C F P S U |
---|