Enum nu_protocol::CommandAction[][src]

pub enum CommandAction {
Show 13 variants ChangePath(String), Exit(i32), Error(ShellError), EnterShell(String), AutoConvert(ValueString), 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)

Change to a new directory or path (in non-filesystem situations)

Tuple Fields of ChangePath

0: String
Exit(i32)

Exit out of Nu

Tuple Fields of Exit

0: i32
Error(ShellError)

Display an error

Tuple Fields of Error

0: ShellError
EnterShell(String)

Enter a new shell at the given path

Tuple Fields of EnterShell

0: String
AutoConvert(ValueString)

Convert the value given from one type to another

Tuple Fields of AutoConvert

0: Value1: String
EnterValueShell(Value)

Enter a value shell, one that allows exploring inside of a Value

Tuple Fields of EnterValueShell

0: Value
AddPlugins(String)

Add plugins from path given

Tuple Fields of AddPlugins

0: String
UnloadConfig(ConfigPath)

Unload the config specified by PathBuf if present

Tuple Fields of UnloadConfig

0: ConfigPath
LoadConfig(ConfigPath)

Load the config specified by PathBuf

Tuple Fields of LoadConfig

0: ConfigPath
PreviousShell

Go to the previous shell in the shell ring buffer

NextShell

Go to the next shell in the shell ring buffer

GotoShell(usize)

Jump to the specified shell in the shell ring buffer

Tuple Fields of GotoShell

0: usize
LeaveShell(i32)

Leave the current shell. If it’s the last shell, exit out of Nu

Tuple Fields of LeaveShell

0: i32

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts a value into a Spanned value

Converts a value into a Spanned value, using an unknown Span

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.