Skip to main content

CommandFn

Type Alias CommandFn 

Source
pub type CommandFn = Arc<dyn Fn(&[String], &mut IoContext) -> Result<(), String> + Send + Sync>;
Expand description

A function that handles a shell command.

Receives the full argument list (argv[0] = command name) and an I/O context whose stdin/stdout/stderr are already wired to the pipeline.

Aliased Typeยง

pub struct CommandFn { /* private fields */ }