Enum nu_protocol::CommandAction [−][src]
pub enum CommandAction {
Show 13 variants
ChangePath(String),
Exit(i32),
Error(ShellError),
EnterShell(String),
AutoConvert(Value, String),
EnterValueShell(Value),
AddPlugins(String),
UnloadConfig(ConfigPath),
LoadConfig(ConfigPath),
PreviousShell,
NextShell,
GotoShell(usize),
LeaveShell(i32),
}Expand description
The inner set of actions for the command processor. Each denotes a way to change state in the processor without changing it directly from the command itself.
Variants
ChangePath(String)
Tuple Fields
0: StringChange to a new directory or path (in non-filesystem situations)
Exit(i32)
Tuple Fields
0: i32Exit out of Nu
Error(ShellError)
Tuple Fields
0: ShellErrorDisplay an error
EnterShell(String)
Tuple Fields
0: StringEnter a new shell at the given path
AutoConvert(Value, String)
Convert the value given from one type to another
EnterValueShell(Value)
Tuple Fields
0: ValueEnter a value shell, one that allows exploring inside of a Value
AddPlugins(String)
Tuple Fields
0: StringAdd plugins from path given
UnloadConfig(ConfigPath)
Tuple Fields
0: ConfigPathUnload the config specified by PathBuf if present
LoadConfig(ConfigPath)
Tuple Fields
0: ConfigPathLoad the config specified by PathBuf
PreviousShell
Go to the previous shell in the shell ring buffer
NextShell
Go to the next shell in the shell ring buffer
GotoShell(usize)
Tuple Fields
0: usizeJump to the specified shell in the shell ring buffer
LeaveShell(i32)
Tuple Fields
0: i32Leave the current shell. If it’s the last shell, exit out of Nu
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Get a command action ready to be pretty-printed
A convenience method that prints out the document without colors in 70 columns. Generally, you should use plain_string or colored_string if possible, but display() can be useful for trace lines and things like that, where you don’t have control over the terminal. Read more
Auto Trait Implementations
impl RefUnwindSafe for CommandAction
impl Send for CommandAction
impl Sync for CommandAction
impl Unpin for CommandAction
impl UnwindSafe for CommandAction
Blanket Implementations
Mutably borrows from an owned value. Read more
