nu_engine

Function eval_expression_with_input

Source
pub fn eval_expression_with_input<D: DebugContext>(
    engine_state: &EngineState,
    stack: &mut Stack,
    expr: &Expression,
    input: PipelineData,
) -> Result<PipelineData, ShellError>
Expand description

Checks the expression to see if it’s a internal or external call. If so, passes the input into the call and gets out the result Otherwise, invokes the expression

It returns PipelineData with a boolean flag, indicating if the external failed to run. The boolean flag may only be true for external calls, for internal calls, it always to be false.