finish up with examples (#4637)

This commit is contained in:
JT
2022-02-25 05:19:25 -05:00
committed by GitHub
parent 2b1e4dd242
commit e8a6458f0d
3 changed files with 30 additions and 3 deletions

View File

@ -8,7 +8,7 @@ use std::sync::mpsc;
use nu_engine::env_to_strings;
use nu_protocol::engine::{EngineState, Stack};
use nu_protocol::{ast::Call, engine::Command, ShellError, Signature, SyntaxShape, Value};
use nu_protocol::{Category, PipelineData, RawStream, Span, Spanned};
use nu_protocol::{Category, Example, PipelineData, RawStream, Span, Spanned};
use itertools::Itertools;
@ -93,6 +93,14 @@ impl Command for External {
};
command.run_with_input(engine_state, stack, input)
}
fn examples(&self) -> Vec<Example> {
vec![Example {
description: "Run an external command",
example: r#"run-external "echo" "-n" "hello""#,
result: None,
}]
}
}
pub struct ExternalCommand {