Expand description
REPL directives
A REPL line starting with : is a framework directive; any other line is
an application command. The set of directives is closed for a given
version of the crate and described by ReplDirective. An application
may rename a directive, change its aliases or its description through the
optional directives: section of its configuration, but it can neither
add nor disable one.
§Default directives
implementation | Name | Aliases | Arguments |
|---|---|---|---|
repl_help | help | h, ? | [command] |
repl_load | load | <path> | |
repl_quit | quit | q | |
repl_exit | exit |
Names and aliases are written without the leading :; the REPL adds it.
§Overriding a directive
directives:
- implementation: repl_help
name: aide
aliases: [a]
description: "Afficher l'aide"An entry replaces the name, the aliases and the description of the
directive selected by implementation; aliases defaults to an empty
list. Directives without an entry keep their defaults.
effective_directives computes the resulting table.
§Validation
The configuration validator rejects:
- an unknown
implementation(already at load time); - two entries for the same
implementation; - an empty name or alias, one containing whitespace, or one starting
with
:; - a name or alias used twice in the effective table, defaults included:
an override cannot take
qwhile:quitkeeps it as its alias.
Directive names are never compared with command names, since a
directive is always typed with its :. Command names and aliases, for
their part, may not start with :.
Structs§
- Directive
Definition - Name, aliases and description of a REPL directive
Enums§
- Repl
Directive - Framework directive available in the REPL
Functions§
- effective_
directives - Complete directive table after applying the configuration overrides