This is the trivial-toplevel-commands Reference Manual, version 0.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:57:41 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
trivial-toplevel-commands
Trivial Toplevel Commands allows to define toplevel commands available on most implementations in a portable fashion.
Artyom Bologov
(GIT https://github.com/aartaka/trivial-toplevel-commands.git)
BSD-3 Clause
0.0.1
package.lisp
(file).
commands.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
trivial-toplevel-commands/trivial-toplevel-commands.asd
trivial-toplevel-commands/package.lisp
trivial-toplevel-commands/commands.lisp
trivial-toplevel-commands/trivial-toplevel-commands.asd
trivial-toplevel-commands
(system).
trivial-toplevel-commands/package.lisp
trivial-toplevel-commands
(system).
trivial-toplevel-commands/commands.lisp
package.lisp
(file).
trivial-toplevel-commands
(system).
command-alias
(function).
command-char
(generic function).
(setf command-char)
(generic function).
command-handler
(function).
command-name
(function).
define-command/eval
(macro).
define-command/read
(macro).
define-command/string
(macro).
remove-command
(function).
alias->name
(special variable).
name->alias
(special variable).
name->handler
(special variable).
string-slurp-forms
(function).
toplevel-name
(function).
Packages are listed by definition order.
trivial-toplevel-commands
‘trivial-toplevel-commands’ allows (un)defining new toplevel commands.
There are three macros defining new commands:
- ‘define-command/string’ to define commands that process a single
string argument—the rest of the command invocation.
- ‘define-command/read’ macro binds a new command that processed the
arguments passed to it without evaluating them.
- And ‘define-command/eval’ doing the same but with arguments
evaluated.
- Shorter ‘defcommand/*’ versions are available too.
‘remove-command’ unbinds the defined command. By full name or alias.
‘command-alias’, ‘command-name’, and ‘command-handler’ allow to get
the name, alias, and handler of command by name/alias.
See function/macro docstrings and README file for usage examples.
TODO: Examples should belong to macros/functions/package themselves, not to the README...
toplevel-commands
tpl-cmds
tpl-cmd
common-lisp
.
command-alias
(function).
command-char
(generic function).
(setf command-char)
(generic function).
command-handler
(function).
command-name
(function).
defcommand
(macro).
defcommand/eval
(macro).
defcommand/read
(macro).
defcommand/string
(macro).
define-command
(macro).
define-command/eval
(macro).
define-command/read
(macro).
define-command/string
(macro).
remove-command
(function).
alias->name
(special variable).
name->alias
(special variable).
name->handler
(special variable).
string-slurp-forms
(function).
toplevel-name
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Define NAME command running BODY with raw ‘read’ s-exprs as ARGUMENTS.
For more info, see ‘define-command/string’.
Define NAME command running BODY with ‘eval’-uated ARGUMENTS.
For more info, see ‘define-command/string’.
Define NAME command running BODY with raw ‘read’ s-exprs as ARGUMENTS.
For more info, see ‘define-command/string’.
Define NAME command running BODY with string command ARGUMENT.
ARGUMENT is always a string, even if empty one.
- For command ":foo abc", the ARGUMENT is "abc".
- For command ":foo", the ARGUMENT is "".
NAME is either:
- A single symbol—full name of the new command.
- A (FULL-NAME ALIAS) list—for the aliased command.
In case NAME matches an existing command, redefine it.
DOCUMENTATION docstring should have a one-line executive summary as
the first line. That’s what most implementations will show alongside
the command name/alias. The rest of the DOCUMENTATION is additional
details, which might or might not get attached to the generated
command handler, but aren’t guaranteed to be anywhere, especially
across implementations.
SBCL quirk: new command is only accessible in break/debug loop or via
ACLREPL contrib:
(require "sb-aclrepl")
Define NAME command running BODY with raw ‘read’ s-exprs as ARGUMENTS.
For more info, see ‘define-command/string’.
Define NAME command running BODY with ‘eval’-uated ARGUMENTS.
For more info, see ‘define-command/string’.
Define NAME command running BODY with raw ‘read’ s-exprs as ARGUMENTS.
For more info, see ‘define-command/string’.
Define NAME command running BODY with string command ARGUMENT.
ARGUMENT is always a string, even if empty one.
- For command ":foo abc", the ARGUMENT is "abc".
- For command ":foo", the ARGUMENT is "".
NAME is either:
- A single symbol—full name of the new command.
- A (FULL-NAME ALIAS) list—for the aliased command.
In case NAME matches an existing command, redefine it.
DOCUMENTATION docstring should have a one-line executive summary as
the first line. That’s what most implementations will show alongside
the command name/alias. The rest of the DOCUMENTATION is additional
details, which might or might not get attached to the generated
command handler, but aren’t guaranteed to be anywhere, especially
across implementations.
SBCL quirk: new command is only accessible in break/debug loop or via
ACLREPL contrib:
(require "sb-aclrepl")
Get the alias for NAME-OR-ALIASed command.
Get the name for NAME-OR-ALIASed command.
Remove a previously defined toplevel command by NAME-OR-ALIAS. Can also remove built-in toplevel command (except when on CLISP.)
Return current command char or set it to CHAR (when provided).
Table to find command name by alias. Useful for ‘remove-command’.
Table to find command alias by name. Useful for ‘remove-command’.
Table to find actual command handler (symbol) by name. Useful for ‘command-handler’.
Jump to: | (
C D F G M R S T |
---|
Jump to: | (
C D F G M R S T |
---|
Jump to: | A N S |
---|
Jump to: | A N S |
---|
Jump to: | C F P S T |
---|
Jump to: | C F P S T |
---|