SET
Set
Bases: Command
Set Shell Variables and update config.ini via configparser.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_path
|
str
|
The path to the config. Defaults to the user's home directory or the current working directory. |
required |
Examples:
set
Source code in src/textual_shell/commands/set.py
create_job(*args)
Create a job to handle the execution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args
|
tuple[str]
|
Should contain the section, setting, and value. |
()
|
Returns:
| Name | Type | Description |
|---|---|---|
set_job |
SetJob
|
The job to handle the execution. |
Source code in src/textual_shell/commands/set.py
load_sections()
Load the settings from the config file into the command definition.
Source code in src/textual_shell/commands/set.py
SetJob
Bases: Job
Job for handling setting shell variables.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
section_name
|
str
|
The name of the section. |
required |
setting_name
|
str
|
The name of the setting. |
required |
value
|
str
|
The value the setting was set to. |
required |
config
|
str
|
The path to the config. |
required |
Source code in src/textual_shell/commands/set.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | |
SettingsChanged
Bases: Message
Event for when a setting has been changed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
section_name
|
str
|
The name of the section. |
required |
setting_name
|
str
|
The name of the setting. |
required |
value
|
str
|
The value the setting was set to. |
required |
Source code in src/textual_shell/commands/set.py
execute()
async
Update the setting in the config.