Shell
Sub classes¶
| Name | Children | Inherits |
|---|---|---|
| PtyShell acptui.shell An interactive bash / zsh in a pseudo-terminal, started on the first command. |
||
| ProcessShell acptui.shell One process per command (Windows, or no bash / zsh): nothing carries over. |
🛈 DocStrings¶
Runs the user's commands one at a time; subclasses decide how.
Source code in src/acptui/shell.py
cwd
instance-attribute
¶
Where the next command starts (follows cd in a persistent shell).
on_output
instance-attribute
¶
Called with the running command whenever it has new output or finishes.
persistent
instance-attribute
¶
Whether state (cd, variables) carries over between commands.
close
¶
interrupt
async
¶
run
async
¶
run(command: str) -> ShellCommand