Interface ShellContext
Source: shell.ts
The context object provided to command execution functions.
Extends
Properties
stdin
stdin:
Stream
The stream used to receive input data.
Inherited from
stdout
stdout:
Stream
The stream used to output standard data.
Inherited from
stderr
stderr:
Stream
The stream used to output error messages.
Inherited from
shell
shell:
Shell
Reference to the parent Shell instance.
workingDirectory
workingDirectory:
VirtualFolder
The directory where the command was executed.
username
username:
string
The name of the user executing the command.
hostname
hostname:
string
The hostname of the virtual system.
rawLine
rawLine:
string
The full, unparsed command line string (excluding pipes/redirects).
options
options:
string[]
Array of parsed flags in their short form (e.g., ["l", "a"]).
exit()
exit: () =>
void
Function to kill the shell session.
Returns
void
See
inputs
inputs:
Record<string,string>
Map of option keys in their short form to their provided values.
timestamp
timestamp:
number
Millisecond timestamp of when the command was started.
virtualRoot
virtualRoot:
VirtualRoot
settingsManager
settingsManager:
SettingsManager
systemManager
systemManager:
SystemManager
app?
optionalapp:App<WindowProps>
The owning application, if any.
size
readonlysize:Vector2
The current dimensions of the terminal window.
env
env:
ShellEnvironment
The scoped environment variables for this process.