repl
repl
Generic prompt_toolkit REPL driver for command-group trees.
NamespaceCompleter
Bases: Completer
Hierarchical tab-completer for a command-group tree.
Initialise the completer for a command tree.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
CommandGroup
|
The root command-group to complete against. |
required |
Source code in src/applied_motion/cli/compose/repl.py
get_completions
Yield completion candidates for the current input.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
document
|
The current input document. |
required | |
complete_event
|
Completion event object. |
required |
Source code in src/applied_motion/cli/compose/repl.py
render_help
Render an aggregated help listing for a command tree.
Source code in src/applied_motion/cli/compose/repl.py
run_repl
run_repl(
root: CommandGroup,
prompt: str = "> ",
console: Console | None = None,
intro: bool = True,
) -> None
Run an interactive REPL over a command tree.