ETerminal Terminal
Examples
Commands and history
Custom command
Async command
Command error
Custom prompt
Properties
PropertyDescriptionValues and default
promptstringPrompt before terminal input.
Default
"$"welcomestringMessage displayed above terminal output.
Default
""historyLimitintMaximum retained commands and output records; minimum 1.
Default
200commandHandlervarHandler accepting a command and returning output or a Promise.
Default
nullbusyboolRead onlyWaiting for a command result; prevents another command from starting.
Default
state.busyinputaliasRead onlyTerminal command input control.
Default
commandInputentriesvarRead onlyTerminal output entries containing command, output and error.
Default
state.entriesSignals
SignaturePurpose
submitted(string command)Emitted when a command is submitted; command is the entered command text.
completed(string command, string output, bool error)Emitted when command execution finishes; command is the command, output is its output, and error indicates failure.
Methods
SignaturePurpose
clear()Clear the current contents or selection.
write(text, error)Append text to the terminal; display it as an error when error is true.
execute(command)Execute the terminal command specified by command.