Function nu_cmd_base::input_handler::operate

source ยท
pub fn operate<C, A>(
    cmd: C,
    arg: A,
    input: PipelineData,
    span: Span,
    ctrlc: Option<Arc<AtomicBool>>
) -> Result<PipelineData, ShellError>
where A: CmdArgument + Send + Sync + 'static, C: Fn(&Value, &A, Span) -> Value + Send + Sync + 'static + Clone + Copy,
Expand description

A simple wrapper for PipelineData::map method.

In detail, for each elements, invoking relative cmd with arg.

If arg tell us that its cell path is not None, only map over data under these columns. Else it will apply each column inside a table.

The validation of input element should be handle by cmd itself.