This module contains SystemCommands
, a command palette command provider for Textual system commands.
This is a simple command provider that makes the most obvious application
actions available via the command palette.
Note
The App base class installs this automatically.
SystemCommandsProvider
SystemCommandsProvider(screen, match_style=None)
Bases: Provider
A source of command palette commands that run app-wide tasks.
Used by default in App.COMMANDS
.
discover
async
Handle a request for the discovery commands for this provider.
Yields:
Type |
Description |
Hits
|
Commands that can be discovered.
|
search
async
Handle a request to search for system commands that match the query.
Parameters:
Name |
Type |
Description |
Default |
query
|
str
|
The user input to be matched.
|
required
|
Yields:
Type |
Description |
Hits
|
Command hits for use in the command palette.
|