mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 10:38:07 +02:00
finish up with examples (#4637)
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user