mirror of
https://github.com/nushell/nushell.git
synced 2025-05-09 20:44:29 +02:00
Add examples for builtin help
This commit is contained in:
parent
b32e93de75
commit
f3cfa5e13e
@ -281,6 +281,16 @@ impl Command for Open {
|
|||||||
example: r#"def "from ndjson" [] { from json -o }; open myfile.ndjson"#,
|
example: r#"def "from ndjson" [] { from json -o }; open myfile.ndjson"#,
|
||||||
result: None,
|
result: None,
|
||||||
},
|
},
|
||||||
|
Example {
|
||||||
|
description: "Show the extensions for which the `open` command will automatically parse",
|
||||||
|
example: r#"scope commands
|
||||||
|
| where name starts-with "from "
|
||||||
|
| insert extension { get name | str replace -r "^from " "" | $"*.($in)" }
|
||||||
|
| select extension name
|
||||||
|
| rename --column { name: command }
|
||||||
|
"#,
|
||||||
|
result: None,
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -263,6 +263,17 @@ impl Command for Save {
|
|||||||
example: r#"do -i {} | save foo.txt --stderr bar.txt"#,
|
example: r#"do -i {} | save foo.txt --stderr bar.txt"#,
|
||||||
result: None,
|
result: None,
|
||||||
},
|
},
|
||||||
|
Example {
|
||||||
|
description:
|
||||||
|
"Show the extensions for which the `save` command will automatically serialize",
|
||||||
|
example: r#"scope commands
|
||||||
|
| where name starts-with "to "
|
||||||
|
| insert extension { get name | str replace -r "^to " "" | $"*.($in)" }
|
||||||
|
| select extension name
|
||||||
|
| rename --column { name: command }
|
||||||
|
"#,
|
||||||
|
result: None,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user