completion
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| Completion acptui.completion A completion candidate. |
||
| CompletionContext acptui.completion What is being completed: the token before the cursor and where it starts. |
🛈 DocStrings¶
Completions for the prompt: /commands and @paths.
Completion
dataclass
¶
A completion candidate.
Source code in src/acptui/completion.py
CompletionContext
dataclass
¶
What is being completed: the token before the cursor and where it starts.
Source code in src/acptui/completion.py
complete_command
¶
complete_command(prefix: str, commands: Sequence[AvailableCommand]) -> list[Completion]
Commands matching a prefix (then a substring), with their descriptions.
Source code in src/acptui/completion.py
complete_path
¶
complete_path(token: str, cwd: Path, limit: int = MAX_PATH_COMPLETIONS) -> list[Completion]
Files and directories inside cwd matching a partial path.
Source code in src/acptui/completion.py
completion_context
¶
completion_context(line: str, row: int) -> CompletionContext | None
The completion context for the text before the cursor in line row.
Source code in src/acptui/completion.py
first_line
¶
The first non-empty line: a long description's (a docstring's) summary.