mirror of
https://github.com/nushell/nushell
synced 2025-01-13 21:55:07 +00:00
Rename select to get
This commit is contained in:
parent
8c7fe6d8b8
commit
05dc715876
3 changed files with 3 additions and 3 deletions
|
@ -54,12 +54,12 @@ pub async fn cli() -> Result<(), Box<dyn Error>> {
|
||||||
command("from-json", from_json::from_json),
|
command("from-json", from_json::from_json),
|
||||||
command("from-toml", from_toml::from_toml),
|
command("from-toml", from_toml::from_toml),
|
||||||
command("from-yaml", from_yaml::from_yaml),
|
command("from-yaml", from_yaml::from_yaml),
|
||||||
|
command("get", get::get),
|
||||||
command("open", open::open),
|
command("open", open::open),
|
||||||
command("pick", pick::pick),
|
command("pick", pick::pick),
|
||||||
command("split-column", split_column::split_column),
|
command("split-column", split_column::split_column),
|
||||||
command("split-row", split_row::split_row),
|
command("split-row", split_row::split_row),
|
||||||
command("reject", reject::reject),
|
command("reject", reject::reject),
|
||||||
command("select", select::select),
|
|
||||||
command("trim", trim::trim),
|
command("trim", trim::trim),
|
||||||
command("to-array", to_array::to_array),
|
command("to-array", to_array::to_array),
|
||||||
command("to-json", to_json::to_json),
|
command("to-json", to_json::to_json),
|
||||||
|
|
|
@ -7,12 +7,12 @@ crate mod first;
|
||||||
crate mod from_json;
|
crate mod from_json;
|
||||||
crate mod from_toml;
|
crate mod from_toml;
|
||||||
crate mod from_yaml;
|
crate mod from_yaml;
|
||||||
|
crate mod get;
|
||||||
crate mod ls;
|
crate mod ls;
|
||||||
crate mod open;
|
crate mod open;
|
||||||
crate mod pick;
|
crate mod pick;
|
||||||
crate mod ps;
|
crate mod ps;
|
||||||
crate mod reject;
|
crate mod reject;
|
||||||
crate mod select;
|
|
||||||
crate mod size;
|
crate mod size;
|
||||||
crate mod skip;
|
crate mod skip;
|
||||||
crate mod sort_by;
|
crate mod sort_by;
|
||||||
|
|
|
@ -19,7 +19,7 @@ fn get_member(path: &str, obj: &Value) -> Option<Value> {
|
||||||
Some(current.copy())
|
Some(current.copy())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn select(args: CommandArgs) -> Result<OutputStream, ShellError> {
|
pub fn get(args: CommandArgs) -> Result<OutputStream, ShellError> {
|
||||||
if args.positional.is_empty() {
|
if args.positional.is_empty() {
|
||||||
return Err(ShellError::string("select requires a field"));
|
return Err(ShellError::string("select requires a field"));
|
||||||
}
|
}
|
Loading…
Reference in a new issue