diff --git a/README.md b/README.md index 8d0a388c8c..bff5d1111a 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ At the moment, executing a command that isn't identified as a built-in new comma ## Commands on tables | command | description | | ------------- | ------------- | -| column ...columns | Down-select table to only these columns | +| pick ...columns | Down-select table to only these columns | | reject ...columns | Remove the given columns from the table | | select column-or-column-path | Open given cells as text | | sort-by ...columns | Sort by the given columns | @@ -125,7 +125,7 @@ The name of the columns in the table can be used to sort the table. You can also use the names of the columns to down-select to only the data you want. ```text -~\Code\nushell> ls | column "file name" "file type" size | sort-by "file type" +~\Code\nushell> ls | pick "file name" "file type" size | sort-by "file type" ------------------------------------ file name file type size ------------------------------------ diff --git a/src/cli.rs b/src/cli.rs index 8d3f88266a..967e942ce4 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -48,12 +48,12 @@ pub async fn cli() -> Result<(), Box> { command("cd", cd::cd), command("view", view::view), command("skip", skip::skip), - command("first", take::take), + command("first", first::first), command("size", size::size), command("from-json", from_json::from_json), command("from-toml", from_toml::from_toml), command("open", open::open), - command("column", column::column), + command("pick", pick::pick), command("split-column", split_column::split_column), command("split-row", split_row::split_row), command("reject", reject::reject), diff --git a/src/commands.rs b/src/commands.rs index 9aca425f7d..fa3c307fda 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -1,7 +1,7 @@ crate mod args; crate mod cd; crate mod classified; -crate mod column; +crate mod pick; crate mod command; crate mod config; crate mod from_json; @@ -16,7 +16,7 @@ crate mod skip; crate mod sort_by; crate mod split_column; crate mod split_row; -crate mod take; +crate mod first; crate mod to_array; crate mod to_json; crate mod to_toml; diff --git a/src/commands/take.rs b/src/commands/first.rs similarity index 79% rename from src/commands/take.rs rename to src/commands/first.rs index 03ac492269..9f7748ced2 100644 --- a/src/commands/take.rs +++ b/src/commands/first.rs @@ -3,7 +3,7 @@ use crate::prelude::*; // TODO: "Amount remaining" wrapper -pub fn take(args: CommandArgs) -> Result { +pub fn first(args: CommandArgs) -> Result { let amount = args.positional[0].as_i64()?; let input = args.input; diff --git a/src/commands/column.rs b/src/commands/pick.rs similarity index 89% rename from src/commands/column.rs rename to src/commands/pick.rs index 3e811771e7..7cbf08536a 100644 --- a/src/commands/column.rs +++ b/src/commands/pick.rs @@ -3,7 +3,7 @@ use crate::object::base::select_fields; use crate::object::Value; use crate::prelude::*; -pub fn column(args: CommandArgs) -> Result { +pub fn pick(args: CommandArgs) -> Result { if args.positional.is_empty() { return Err(ShellError::string("select requires a field")); }