Prompt
Prompt
Bases: Widget
Custom Widget for Containing the Prompt Input and Label.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prompt
|
str
|
The prompt for the shell. |
required |
Source code in src/textual_shell/widgets/shell/prompt.py
CommandEntered
CommandInput
Bases: Message
User Typed into the shell.
Source code in src/textual_shell/widgets/shell/prompt.py
on_input_changed(event)
Catch when the input value has changed and and notify the parent shell of the current input and location of the cursor.
Source code in src/textual_shell/widgets/shell/prompt.py
on_input_submitted(event)
Catch when a command has been entered.
Source code in src/textual_shell/widgets/shell/prompt.py
PromptInput
Bases: Input
Custom Input widget for entering commands. Pressing ctrl+space will activate the Suggestions widget. Pressing tab will switch focus to the Suggestions widget. Pressing escape will hide the Suggestions widget.
Source code in src/textual_shell/widgets/shell/prompt.py
AutoComplete
FocusChange
Bases: Message
A message for when the prompt input has either gained or lost focus.
Source code in src/textual_shell/widgets/shell/prompt.py
Hide
Show
Bases: Message
Activate the suggestions widget.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cursor
|
int
|
The x location of the cursor. Used to position the suggestions widget. |
required |