diff --git a/src/cli.rs b/src/cli.rs index dbba220489..4322466088 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -54,12 +54,12 @@ pub async fn cli() -> Result<(), Box> { command("from-json", from_json::from_json), command("from-toml", from_toml::from_toml), command("from-yaml", from_yaml::from_yaml), + command("get", get::get), command("open", open::open), command("pick", pick::pick), command("split-column", split_column::split_column), command("split-row", split_row::split_row), command("reject", reject::reject), - command("select", select::select), command("trim", trim::trim), command("to-array", to_array::to_array), command("to-json", to_json::to_json), diff --git a/src/commands.rs b/src/commands.rs index 9bf38967e0..b0b8a55c06 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -7,12 +7,12 @@ crate mod first; crate mod from_json; crate mod from_toml; crate mod from_yaml; +crate mod get; crate mod ls; crate mod open; crate mod pick; crate mod ps; crate mod reject; -crate mod select; crate mod size; crate mod skip; crate mod sort_by; diff --git a/src/commands/select.rs b/src/commands/get.rs similarity index 95% rename from src/commands/select.rs rename to src/commands/get.rs index c64d7548ee..ca51e01500 100644 --- a/src/commands/select.rs +++ b/src/commands/get.rs @@ -19,7 +19,7 @@ fn get_member(path: &str, obj: &Value) -> Option { Some(current.copy()) } -pub fn select(args: CommandArgs) -> Result { +pub fn get(args: CommandArgs) -> Result { if args.positional.is_empty() { return Err(ShellError::string("select requires a field")); }