Add initial ctrl-c support

This commit is contained in:
JT
2021-10-28 17:13:10 +13:00
parent 1308eb45d5
commit bac8b8a450
32 changed files with 318 additions and 144 deletions

View File

@ -20,13 +20,16 @@ impl Command for SubCommand {
fn run(
&self,
_engine_state: &EngineState,
engine_state: &EngineState,
_stack: &mut Stack,
call: &Call,
input: PipelineData,
) -> Result<nu_protocol::PipelineData, nu_protocol::ShellError> {
let head = call.head;
input.map(move |value| abs_helper(value, head))
input.map(
move |value| abs_helper(value, head),
engine_state.ctrlc.clone(),
)
}
fn examples(&self) -> Vec<Example> {