mirror of
https://github.com/nushell/nushell
synced 2024-12-28 22:13:10 +00:00
Char example (#2231)
* added ansi example * added another example * changed example * ansi changes here by mistake
This commit is contained in:
parent
6eb2c94209
commit
b9278bdfe1
1 changed files with 16 additions and 5 deletions
|
@ -30,11 +30,22 @@ impl WholeStreamCommand for Char {
|
|||
}
|
||||
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
vec![Example {
|
||||
description: "Output newline",
|
||||
example: r#"char newline"#,
|
||||
result: Some(vec![Value::from("\n")]),
|
||||
}]
|
||||
vec![
|
||||
Example {
|
||||
description: "Output newline",
|
||||
example: r#"char newline"#,
|
||||
result: Some(vec![Value::from("\n")]),
|
||||
},
|
||||
Example {
|
||||
description: "Output prompt character, newline and a hamburger character",
|
||||
example: r#"echo $(char prompt) $(char newline) $(char hamburger)"#,
|
||||
result: Some(vec![
|
||||
UntaggedValue::string("\u{25b6}").into(),
|
||||
UntaggedValue::string("\n").into(),
|
||||
UntaggedValue::string("\u{2261}").into(),
|
||||
]),
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
async fn run(
|
||||
|
|
Loading…
Reference in a new issue