mirror of
https://github.com/nushell/nushell.git
synced 2025-02-02 11:39:55 +01:00
Document that open
looks up from
subcommands (#10255)
# Description Related to https://github.com/nushell/nushell.github.io/pull/1048 Include this information in the command help. # User-Facing Changes As soon as this information is documented people are much more likely to depend on it so we need to be careful in the future if this design sparks joy or not.
This commit is contained in:
parent
6a374182a7
commit
bb06661d24
@ -30,6 +30,10 @@ impl Command for Open {
|
||||
"Load a file into a cell, converting to table if possible (avoid by appending '--raw')."
|
||||
}
|
||||
|
||||
fn extra_usage(&self) -> &str {
|
||||
"Support to automatically parse files with an extension `.xyz` can be provided by a `from xyz` command in scope."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["load", "read", "load_file", "read_file"]
|
||||
}
|
||||
@ -241,6 +245,11 @@ impl Command for Open {
|
||||
example: "open myfile.txt --raw | decode utf-8",
|
||||
result: None,
|
||||
},
|
||||
Example {
|
||||
description: "Create a custom `from` parser to open newline-delimited JSON files with `open`",
|
||||
example: r#"def "from ndjson" [] { from json -o }; open myfile.ndjson"#,
|
||||
result: None,
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user