diff --git a/crates/nu-command/src/bytes/add.rs b/crates/nu-command/src/bytes/add.rs index e7e12d7a5..5713249eb 100644 --- a/crates/nu-command/src/bytes/add.rs +++ b/crates/nu-command/src/bytes/add.rs @@ -43,7 +43,7 @@ impl Command for BytesAdd { .rest( "rest", SyntaxShape::CellPath, - "optionally matches prefix of text by column paths", + "for a data structure input, add bytes to the data at the given cell paths", ) .category(Category::Bytes) } diff --git a/crates/nu-command/src/bytes/at.rs b/crates/nu-command/src/bytes/at.rs index 53b453416..c90672d63 100644 --- a/crates/nu-command/src/bytes/at.rs +++ b/crates/nu-command/src/bytes/at.rs @@ -121,7 +121,7 @@ impl Command for BytesAt { .rest( "rest", SyntaxShape::CellPath, - "optionally get bytes by column paths", + "for a data structure input, get bytes from data at the given cell paths", ) .category(Category::Bytes) } diff --git a/crates/nu-command/src/bytes/ends_with.rs b/crates/nu-command/src/bytes/ends_with.rs index 0b41d2e62..9ba8bef4b 100644 --- a/crates/nu-command/src/bytes/ends_with.rs +++ b/crates/nu-command/src/bytes/ends_with.rs @@ -33,7 +33,7 @@ impl Command for BytesEndsWith { .rest( "rest", SyntaxShape::CellPath, - "optionally matches prefix of text by column paths", + "for a data structure input, check if bytes at the given cell paths end with the pattern", ) .category(Category::Bytes) } diff --git a/crates/nu-command/src/bytes/index_of.rs b/crates/nu-command/src/bytes/index_of.rs index 084d755c5..4b922cb44 100644 --- a/crates/nu-command/src/bytes/index_of.rs +++ b/crates/nu-command/src/bytes/index_of.rs @@ -41,7 +41,7 @@ impl Command for BytesIndexOf { .rest( "rest", SyntaxShape::CellPath, - "optionally returns index of pattern in string by column paths", + "for a data structure input, find the indexes at the given cell paths", ) .switch("all", "returns all matched index", Some('a')) .switch("end", "search from the end of the binary", Some('e')) diff --git a/crates/nu-command/src/bytes/length.rs b/crates/nu-command/src/bytes/length.rs index 3823cbe3b..618e0baf5 100644 --- a/crates/nu-command/src/bytes/length.rs +++ b/crates/nu-command/src/bytes/length.rs @@ -21,7 +21,7 @@ impl Command for BytesLen { .rest( "rest", SyntaxShape::CellPath, - "optionally find length of binary by column paths", + "for a data structure input, find the length of data at the given cell paths", ) .category(Category::Bytes) } diff --git a/crates/nu-command/src/bytes/remove.rs b/crates/nu-command/src/bytes/remove.rs index e9106615e..335fb0777 100644 --- a/crates/nu-command/src/bytes/remove.rs +++ b/crates/nu-command/src/bytes/remove.rs @@ -35,7 +35,7 @@ impl Command for BytesRemove { .rest( "rest", SyntaxShape::CellPath, - "optionally remove bytes by column paths", + "for a data structure input, remove bytes from data at the given cell paths", ) .switch("end", "remove from end of binary", Some('e')) .switch("all", "remove occurrences of finding binary", Some('a')) diff --git a/crates/nu-command/src/bytes/replace.rs b/crates/nu-command/src/bytes/replace.rs index 124d018b4..447345fe0 100644 --- a/crates/nu-command/src/bytes/replace.rs +++ b/crates/nu-command/src/bytes/replace.rs @@ -36,7 +36,7 @@ impl Command for BytesReplace { .rest( "rest", SyntaxShape::CellPath, - "optionally find and replace text by column paths", + "for a data structure input, replace bytes in data at the given cell paths", ) .switch("all", "replace all occurrences of find binary", Some('a')) .category(Category::Bytes) diff --git a/crates/nu-command/src/bytes/reverse.rs b/crates/nu-command/src/bytes/reverse.rs index 54b945d6f..b51ef7225 100644 --- a/crates/nu-command/src/bytes/reverse.rs +++ b/crates/nu-command/src/bytes/reverse.rs @@ -21,13 +21,13 @@ impl Command for BytesReverse { .rest( "rest", SyntaxShape::CellPath, - "optionally matches prefix of text by column paths", + "for a data structure input, reverse data at the given cell paths", ) .category(Category::Bytes) } fn usage(&self) -> &str { - "Reverse every bytes in the pipeline" + "Reverse the bytes in the pipeline" } fn search_terms(&self) -> Vec<&str> { diff --git a/crates/nu-command/src/bytes/starts_with.rs b/crates/nu-command/src/bytes/starts_with.rs index 4242c22f7..43d30f87e 100644 --- a/crates/nu-command/src/bytes/starts_with.rs +++ b/crates/nu-command/src/bytes/starts_with.rs @@ -33,7 +33,7 @@ impl Command for BytesStartsWith { .rest( "rest", SyntaxShape::CellPath, - "optionally matches prefix of text by column paths", + "for a data structure input, check if bytes at the given cell paths start with the pattern", ) .category(Category::Bytes) } diff --git a/crates/nu-command/src/conversions/into/binary.rs b/crates/nu-command/src/conversions/into/binary.rs index 884d5f221..188d30e57 100644 --- a/crates/nu-command/src/conversions/into/binary.rs +++ b/crates/nu-command/src/conversions/into/binary.rs @@ -30,7 +30,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "column paths to convert to binary (for table input)", + "for a data structure input, convert data at the given cell paths", ) .category(Category::Conversions) } diff --git a/crates/nu-command/src/conversions/into/bool.rs b/crates/nu-command/src/conversions/into/bool.rs index b0af12143..fee0dc24a 100644 --- a/crates/nu-command/src/conversions/into/bool.rs +++ b/crates/nu-command/src/conversions/into/bool.rs @@ -26,7 +26,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "column paths to convert to boolean (for table input)", + "for a data structure input, convert data at the given cell paths", ) .category(Category::Conversions) } diff --git a/crates/nu-command/src/conversions/into/datetime.rs b/crates/nu-command/src/conversions/into/datetime.rs index 9650469ee..01e238f91 100644 --- a/crates/nu-command/src/conversions/into/datetime.rs +++ b/crates/nu-command/src/conversions/into/datetime.rs @@ -94,7 +94,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally convert text into datetime by column paths", + "for a data structure input, convert data at the given cell paths", ) .category(Category::Conversions) } diff --git a/crates/nu-command/src/conversions/into/decimal.rs b/crates/nu-command/src/conversions/into/decimal.rs index 95f240f46..207167ca8 100644 --- a/crates/nu-command/src/conversions/into/decimal.rs +++ b/crates/nu-command/src/conversions/into/decimal.rs @@ -23,7 +23,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally convert text into decimal by column paths", + "for a data structure input, convert data at the given cell paths", ) } diff --git a/crates/nu-command/src/conversions/into/duration.rs b/crates/nu-command/src/conversions/into/duration.rs index 9257d796f..c32e453e0 100644 --- a/crates/nu-command/src/conversions/into/duration.rs +++ b/crates/nu-command/src/conversions/into/duration.rs @@ -33,7 +33,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "column paths to convert to duration (for table input)", + "for a data structure input, convert data at the given cell paths", ) .category(Category::Conversions) } diff --git a/crates/nu-command/src/conversions/into/filesize.rs b/crates/nu-command/src/conversions/into/filesize.rs index 545d3e342..70f5f4f22 100644 --- a/crates/nu-command/src/conversions/into/filesize.rs +++ b/crates/nu-command/src/conversions/into/filesize.rs @@ -25,7 +25,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "column paths to convert to filesize (for table input)", + "for a data structure input, convert data at the given cell paths", ) .category(Category::Conversions) } diff --git a/crates/nu-command/src/conversions/into/int.rs b/crates/nu-command/src/conversions/into/int.rs index 2cec85cc5..4b532a8af 100644 --- a/crates/nu-command/src/conversions/into/int.rs +++ b/crates/nu-command/src/conversions/into/int.rs @@ -43,7 +43,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "column paths to convert to int (for table input)", + "for a data structure input, convert data at the given cell paths", ) .category(Category::Conversions) } diff --git a/crates/nu-command/src/conversions/into/string.rs b/crates/nu-command/src/conversions/into/string.rs index 41d0d02de..3216b8933 100644 --- a/crates/nu-command/src/conversions/into/string.rs +++ b/crates/nu-command/src/conversions/into/string.rs @@ -42,11 +42,10 @@ impl Command for SubCommand { (Type::Date, Type::String), ]) .allow_variants_without_examples(true) // https://github.com/nushell/nushell/issues/7032 - // FIXME - need to support column paths .rest( "rest", SyntaxShape::CellPath, - "column paths to convert to string (for table input)", + "for a data structure input, convert data at the given cell paths", ) .named( "decimals", diff --git a/crates/nu-command/src/input_handler.rs b/crates/nu-command/src/input_handler.rs index 0cee3890e..342c00bf6 100644 --- a/crates/nu-command/src/input_handler.rs +++ b/crates/nu-command/src/input_handler.rs @@ -33,7 +33,7 @@ impl From> for CellPathOnlyArgs { /// /// In detail, for each elements, invoking relative `cmd` with `arg`. /// -/// If `arg` tell us that it's column path is not None, only map over data under these columns. +/// If `arg` tell us that its cell path is not None, only map over data under these columns. /// Else it will apply each column inside a table. /// /// The validation of input element should be handle by `cmd` itself. diff --git a/crates/nu-command/src/misc/tutor.rs b/crates/nu-command/src/misc/tutor.rs index d2d952494..2db272d2f 100644 --- a/crates/nu-command/src/misc/tutor.rs +++ b/crates/nu-command/src/misc/tutor.rs @@ -313,9 +313,9 @@ tutor each fn each_tutor() -> &'static str { r#" -The `each` command gives us a way of working with each individual row or -element of a list one at a time. It reads these in from the pipeline and -runs a block on each element. A block is a group of pipelines. +The `each` command gives us a way of working with the individual elements +(sometimes called 'rows') of a list one at a time. It reads these in from +the pipeline and runs a block on each one. A block is a group of pipelines. ``` echo 1 2 3 | each { |it| $it + 10} ``` @@ -375,9 +375,9 @@ second block if the expression is false. fn shorthand_tutor() -> &'static str { r#" -You can access cells in a table using a shorthand notation sometimes called a -"column path" or "cell path". These paths allow you to go from a table to -rows, columns, or cells inside of the table. +You can access data in a structure via a shorthand notation called a "cell path", +sometimes called a "column path". These paths allow you to go from a structure to +rows, columns, or cells inside of the structure. Shorthand paths are made from rows numbers, column names, or both. You can use them on any variable or subexpression. @@ -392,8 +392,8 @@ the shorthand path to retrieve only the cell data inside the "PWD" column. This will retrieve the cell data in the "name" column on the 5th row (note: row numbers are zero-based). -Rows and columns don't need to come in any specific order. You can get the -same value using: +For tables, rows and columns don't need to come in any specific order. You can +produce the same value using: ``` (ls).4.name ``` diff --git a/crates/nu-command/src/path/basename.rs b/crates/nu-command/src/path/basename.rs index bab776af6..222319de1 100644 --- a/crates/nu-command/src/path/basename.rs +++ b/crates/nu-command/src/path/basename.rs @@ -34,7 +34,7 @@ impl Command for SubCommand { .named( "columns", SyntaxShape::Table, - "Optionally operate by column path", + "For a record or table input, convert strings in the given columns to their basename", Some('c'), ) .named( diff --git a/crates/nu-command/src/path/dirname.rs b/crates/nu-command/src/path/dirname.rs index 6fbd170e6..48a762178 100644 --- a/crates/nu-command/src/path/dirname.rs +++ b/crates/nu-command/src/path/dirname.rs @@ -31,7 +31,7 @@ impl Command for SubCommand { .named( "columns", SyntaxShape::Table, - "Optionally operate by column path", + "For a record or table input, convert strings at the given columns to their dirname", Some('c'), ) .named( diff --git a/crates/nu-command/src/path/exists.rs b/crates/nu-command/src/path/exists.rs index 29d57f699..78740ed41 100644 --- a/crates/nu-command/src/path/exists.rs +++ b/crates/nu-command/src/path/exists.rs @@ -31,7 +31,7 @@ impl Command for SubCommand { .named( "columns", SyntaxShape::Table, - "Optionally operate by column path", + "For a record or table input, check strings at the given columns, and replace with result", Some('c'), ) } diff --git a/crates/nu-command/src/path/expand.rs b/crates/nu-command/src/path/expand.rs index cece7a4d3..1423c40aa 100644 --- a/crates/nu-command/src/path/expand.rs +++ b/crates/nu-command/src/path/expand.rs @@ -42,7 +42,7 @@ impl Command for SubCommand { .named( "columns", SyntaxShape::Table, - "Optionally operate by column path", + "For a record or table input, expand strings at the given columns", Some('c'), ) } diff --git a/crates/nu-command/src/path/join.rs b/crates/nu-command/src/path/join.rs index 2625f4a27..51cade4c1 100644 --- a/crates/nu-command/src/path/join.rs +++ b/crates/nu-command/src/path/join.rs @@ -40,7 +40,7 @@ impl Command for SubCommand { .named( "columns", SyntaxShape::Table, - "Optionally operate by column path", + "For a record or table input, join strings at the given columns", Some('c'), ) .rest("append", SyntaxShape::String, "Path to append to the input") diff --git a/crates/nu-command/src/path/parse.rs b/crates/nu-command/src/path/parse.rs index 97aa6af5d..a2217c71e 100644 --- a/crates/nu-command/src/path/parse.rs +++ b/crates/nu-command/src/path/parse.rs @@ -33,7 +33,7 @@ impl Command for SubCommand { .named( "columns", SyntaxShape::Table, - "Optionally operate by column path", + "For a record or table input, convert strings at the given columns", Some('c'), ) .named( diff --git a/crates/nu-command/src/path/relative_to.rs b/crates/nu-command/src/path/relative_to.rs index b40b61f2e..716be7358 100644 --- a/crates/nu-command/src/path/relative_to.rs +++ b/crates/nu-command/src/path/relative_to.rs @@ -38,13 +38,13 @@ impl Command for SubCommand { .named( "columns", SyntaxShape::Table, - "Optionally operate by column path", + "For a record or table input, convert strings at the given columns", Some('c'), ) } fn usage(&self) -> &str { - "Get a path as relative to another path." + "Express a path as relative to another path." } fn extra_usage(&self) -> &str { diff --git a/crates/nu-command/src/path/split.rs b/crates/nu-command/src/path/split.rs index cefb0f4d7..95bbee2c0 100644 --- a/crates/nu-command/src/path/split.rs +++ b/crates/nu-command/src/path/split.rs @@ -31,7 +31,7 @@ impl Command for SubCommand { .named( "columns", SyntaxShape::Table, - "Optionally operate by column path", + "For a record or table input, split strings at the given columns", Some('c'), ) } diff --git a/crates/nu-command/src/path/type.rs b/crates/nu-command/src/path/type.rs index d14252567..959d814bb 100644 --- a/crates/nu-command/src/path/type.rs +++ b/crates/nu-command/src/path/type.rs @@ -31,7 +31,7 @@ impl Command for SubCommand { .named( "columns", SyntaxShape::Table, - "Optionally operate by column path", + "For a record or table input, check strings at the given columns, and replace with result", Some('c'), ) } diff --git a/crates/nu-command/src/platform/ansi/gradient.rs b/crates/nu-command/src/platform/ansi/gradient.rs index 5749b25dd..76b99dfeb 100644 --- a/crates/nu-command/src/platform/ansi/gradient.rs +++ b/crates/nu-command/src/platform/ansi/gradient.rs @@ -39,15 +39,15 @@ impl Command for SubCommand { Some('d'), ) .rest( - "column path", + "cell path", SyntaxShape::CellPath, - "optionally, draw gradients using text from column paths", + "for a data structure input, add a gradient to strings at the given cell paths", ) .category(Category::Platform) } fn usage(&self) -> &str { - "Draw text with a provided start and end code making a gradient" + "Add a color gradient (using ANSI color codes) to the given string" } fn run( diff --git a/crates/nu-command/src/platform/ansi/strip.rs b/crates/nu-command/src/platform/ansi/strip.rs index e18f4fe83..9f903f855 100644 --- a/crates/nu-command/src/platform/ansi/strip.rs +++ b/crates/nu-command/src/platform/ansi/strip.rs @@ -16,9 +16,9 @@ impl Command for SubCommand { Signature::build("ansi strip") .input_output_types(vec![(Type::String, Type::String)]) .rest( - "column path", + "cell path", SyntaxShape::CellPath, - "optionally, remove ANSI sequences by column paths", + "for a data structure input, remove ANSI sequences from strings at the given cell paths", ) .category(Category::Platform) } diff --git a/crates/nu-command/src/strings/encode_decode/decode_base64.rs b/crates/nu-command/src/strings/encode_decode/decode_base64.rs index d92989b14..b587fd966 100644 --- a/crates/nu-command/src/strings/encode_decode/decode_base64.rs +++ b/crates/nu-command/src/strings/encode_decode/decode_base64.rs @@ -34,7 +34,7 @@ impl Command for DecodeBase64 { .rest( "rest", SyntaxShape::CellPath, - "optionally base64 decode data by column paths", + "For a data structure input, decode data at the given cell paths", ) .category(Category::Hash) } diff --git a/crates/nu-command/src/strings/encode_decode/encode_base64.rs b/crates/nu-command/src/strings/encode_decode/encode_base64.rs index 44474ca93..27cf6879a 100644 --- a/crates/nu-command/src/strings/encode_decode/encode_base64.rs +++ b/crates/nu-command/src/strings/encode_decode/encode_base64.rs @@ -26,7 +26,7 @@ impl Command for EncodeBase64 { .rest( "rest", SyntaxShape::CellPath, - "optionally base64 encode data by column paths", + "For a data structure input, encode data at the given cell paths", ) .output_type(Type::String) .category(Category::Hash) diff --git a/crates/nu-command/src/strings/format/filesize.rs b/crates/nu-command/src/strings/format/filesize.rs index 71e52e6a4..61c540a9e 100644 --- a/crates/nu-command/src/strings/format/filesize.rs +++ b/crates/nu-command/src/strings/format/filesize.rs @@ -37,7 +37,7 @@ impl Command for FileSize { .rest( "rest", SyntaxShape::CellPath, - "Optionally find and replace text by column paths", + "For a data structure input, format filesizes at the given cell paths", ) .category(Category::Strings) } diff --git a/crates/nu-command/src/strings/str_/case/camel_case.rs b/crates/nu-command/src/strings/str_/case/camel_case.rs index 217f5b17f..b1164feca 100644 --- a/crates/nu-command/src/strings/str_/case/camel_case.rs +++ b/crates/nu-command/src/strings/str_/case/camel_case.rs @@ -22,7 +22,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally convert text to camelCase by column paths", + "For a data structure input, convert strings at the given cell paths", ) .category(Category::Strings) } diff --git a/crates/nu-command/src/strings/str_/case/capitalize.rs b/crates/nu-command/src/strings/str_/case/capitalize.rs index d0506bfe8..c1f9be4a9 100644 --- a/crates/nu-command/src/strings/str_/case/capitalize.rs +++ b/crates/nu-command/src/strings/str_/case/capitalize.rs @@ -20,7 +20,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally capitalize text by column paths", + "For a data structure input, convert strings at the given cell paths", ) .category(Category::Strings) } diff --git a/crates/nu-command/src/strings/str_/case/downcase.rs b/crates/nu-command/src/strings/str_/case/downcase.rs index 6307baa34..cccda167b 100644 --- a/crates/nu-command/src/strings/str_/case/downcase.rs +++ b/crates/nu-command/src/strings/str_/case/downcase.rs @@ -20,7 +20,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally downcase text by column paths", + "For a data structure input, convert strings at the given cell paths", ) .category(Category::Strings) } diff --git a/crates/nu-command/src/strings/str_/case/kebab_case.rs b/crates/nu-command/src/strings/str_/case/kebab_case.rs index 83d96aa0b..70a59c9db 100644 --- a/crates/nu-command/src/strings/str_/case/kebab_case.rs +++ b/crates/nu-command/src/strings/str_/case/kebab_case.rs @@ -22,7 +22,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally convert text to kebab-case by column paths", + "For a data structure input, convert strings at the given cell paths", ) .category(Category::Strings) } diff --git a/crates/nu-command/src/strings/str_/case/pascal_case.rs b/crates/nu-command/src/strings/str_/case/pascal_case.rs index 9256927a8..9efc5e6f8 100644 --- a/crates/nu-command/src/strings/str_/case/pascal_case.rs +++ b/crates/nu-command/src/strings/str_/case/pascal_case.rs @@ -22,7 +22,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally convert text to PascalCase by column paths", + "For a data structure input, convert strings at the given cell paths", ) .category(Category::Strings) } diff --git a/crates/nu-command/src/strings/str_/case/screaming_snake_case.rs b/crates/nu-command/src/strings/str_/case/screaming_snake_case.rs index 32b88ed3d..bab612b1c 100644 --- a/crates/nu-command/src/strings/str_/case/screaming_snake_case.rs +++ b/crates/nu-command/src/strings/str_/case/screaming_snake_case.rs @@ -21,7 +21,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally convert text to SCREAMING_SNAKE_CASE by column paths", + "For a data structure input, convert strings at the given cell paths", ) .category(Category::Strings) } diff --git a/crates/nu-command/src/strings/str_/case/snake_case.rs b/crates/nu-command/src/strings/str_/case/snake_case.rs index 34f878178..ba837d119 100644 --- a/crates/nu-command/src/strings/str_/case/snake_case.rs +++ b/crates/nu-command/src/strings/str_/case/snake_case.rs @@ -21,7 +21,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally convert text to snake_case by column paths", + "For a data structure input, convert strings at the given cell paths", ) .category(Category::Strings) } diff --git a/crates/nu-command/src/strings/str_/case/title_case.rs b/crates/nu-command/src/strings/str_/case/title_case.rs index 61ba3cdeb..cdeef65b4 100644 --- a/crates/nu-command/src/strings/str_/case/title_case.rs +++ b/crates/nu-command/src/strings/str_/case/title_case.rs @@ -22,7 +22,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally convert text to Title Case by column paths", + "For a data structure input, convert strings at the given cell paths", ) .category(Category::Strings) } diff --git a/crates/nu-command/src/strings/str_/case/upcase.rs b/crates/nu-command/src/strings/str_/case/upcase.rs index 63b60c1f6..14faf289d 100644 --- a/crates/nu-command/src/strings/str_/case/upcase.rs +++ b/crates/nu-command/src/strings/str_/case/upcase.rs @@ -19,7 +19,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally upcase text by column paths", + "For a data structure input, convert strings at the given cell paths", ) } diff --git a/crates/nu-command/src/strings/str_/contains.rs b/crates/nu-command/src/strings/str_/contains.rs index 1da80c5dd..b66d86d71 100644 --- a/crates/nu-command/src/strings/str_/contains.rs +++ b/crates/nu-command/src/strings/str_/contains.rs @@ -31,11 +31,11 @@ impl Command for SubCommand { Signature::build("str contains") .input_output_types(vec![(Type::String, Type::Bool)]) .vectorizes_over_list(true) - .required("string", SyntaxShape::String, "the string to find") + .required("string", SyntaxShape::String, "the substring to find") .rest( "rest", SyntaxShape::CellPath, - "optionally check if input contains string by column paths", + "For a data structure input, check strings at the given cell paths, and replace with result", ) .switch("insensitive", "search is case insensitive", Some('i')) .switch("not", "does not contain", Some('n')) @@ -43,7 +43,7 @@ impl Command for SubCommand { } fn usage(&self) -> &str { - "Checks if input contains string" + "Checks if string input contains a substring" } fn search_terms(&self) -> Vec<&str> { diff --git a/crates/nu-command/src/strings/str_/distance.rs b/crates/nu-command/src/strings/str_/distance.rs index c9ec679db..a52a57d80 100644 --- a/crates/nu-command/src/strings/str_/distance.rs +++ b/crates/nu-command/src/strings/str_/distance.rs @@ -37,7 +37,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally check if string contains pattern by column paths", + "For a data structure input, check strings at the given cell paths, and replace with result", ) .category(Category::Strings) } diff --git a/crates/nu-command/src/strings/str_/ends_with.rs b/crates/nu-command/src/strings/str_/ends_with.rs index dedb3aae3..b17e1a356 100644 --- a/crates/nu-command/src/strings/str_/ends_with.rs +++ b/crates/nu-command/src/strings/str_/ends_with.rs @@ -33,7 +33,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally matches suffix of text by cell paths", + "For a data structure input, check strings at the given cell paths, and replace with result", ) .category(Category::Strings) } diff --git a/crates/nu-command/src/strings/str_/index_of.rs b/crates/nu-command/src/strings/str_/index_of.rs index e10953fd1..bc633890c 100644 --- a/crates/nu-command/src/strings/str_/index_of.rs +++ b/crates/nu-command/src/strings/str_/index_of.rs @@ -39,7 +39,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally returns index of string in input by column paths", + "For a data structure input, search strings at the given cell paths, and replace with result", ) .named( "range", diff --git a/crates/nu-command/src/strings/str_/length.rs b/crates/nu-command/src/strings/str_/length.rs index 22cc71539..c28177ebe 100644 --- a/crates/nu-command/src/strings/str_/length.rs +++ b/crates/nu-command/src/strings/str_/length.rs @@ -20,7 +20,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally find length of text by column paths", + "For a data structure input, replace strings at the given cell paths with their length", ) .category(Category::Strings) } diff --git a/crates/nu-command/src/strings/str_/lpad.rs b/crates/nu-command/src/strings/str_/lpad.rs index c22221e8e..2bad8fdad 100644 --- a/crates/nu-command/src/strings/str_/lpad.rs +++ b/crates/nu-command/src/strings/str_/lpad.rs @@ -40,7 +40,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally check if string contains pattern by column paths", + "For a data structure input, pad strings at the given cell paths", ) .category(Category::Strings) } diff --git a/crates/nu-command/src/strings/str_/replace.rs b/crates/nu-command/src/strings/str_/replace.rs index 60edfe3ab..2dac73483 100644 --- a/crates/nu-command/src/strings/str_/replace.rs +++ b/crates/nu-command/src/strings/str_/replace.rs @@ -40,7 +40,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally find and replace text by column paths", + "For a data structure input, operate on strings at the given cell paths", ) .switch("all", "replace all occurrences of find string", Some('a')) .switch( diff --git a/crates/nu-command/src/strings/str_/reverse.rs b/crates/nu-command/src/strings/str_/reverse.rs index 8e8681dd1..d5e22024c 100644 --- a/crates/nu-command/src/strings/str_/reverse.rs +++ b/crates/nu-command/src/strings/str_/reverse.rs @@ -21,7 +21,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally reverse text by column paths", + "For a data structure input, reverse strings at the given cell paths", ) .category(Category::Strings) } diff --git a/crates/nu-command/src/strings/str_/rpad.rs b/crates/nu-command/src/strings/str_/rpad.rs index b4b87c4f1..87cb9be68 100644 --- a/crates/nu-command/src/strings/str_/rpad.rs +++ b/crates/nu-command/src/strings/str_/rpad.rs @@ -40,7 +40,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally check if string contains pattern by column paths", + "For a data structure input, pad strings at the given cell paths", ) .category(Category::Strings) } diff --git a/crates/nu-command/src/strings/str_/starts_with.rs b/crates/nu-command/src/strings/str_/starts_with.rs index 375401163..56e1091b4 100644 --- a/crates/nu-command/src/strings/str_/starts_with.rs +++ b/crates/nu-command/src/strings/str_/starts_with.rs @@ -35,7 +35,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally matches prefix of text by column paths", + "For a data structure input, check strings at the given cell paths, and replace with result", ) .category(Category::Strings) } diff --git a/crates/nu-command/src/strings/str_/substring.rs b/crates/nu-command/src/strings/str_/substring.rs index 6eb738c7a..ab876e19e 100644 --- a/crates/nu-command/src/strings/str_/substring.rs +++ b/crates/nu-command/src/strings/str_/substring.rs @@ -48,7 +48,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally substring text by column paths", + "For a data structure input, turn strings at the given cell paths into substrings", ) } diff --git a/crates/nu-command/src/strings/str_/trim/trim_.rs b/crates/nu-command/src/strings/str_/trim/trim_.rs index c38ed3cc0..7373a02d1 100644 --- a/crates/nu-command/src/strings/str_/trim/trim_.rs +++ b/crates/nu-command/src/strings/str_/trim/trim_.rs @@ -44,8 +44,7 @@ impl Command for SubCommand { .rest( "rest", SyntaxShape::CellPath, - "optionally trim text by column paths", - ) + "For a data structure input, trim strings at the given cell paths", ) .named( "char", SyntaxShape::String, diff --git a/crates/nu-protocol/src/value/mod.rs b/crates/nu-protocol/src/value/mod.rs index c9562cae8..c540f04a9 100644 --- a/crates/nu-protocol/src/value/mod.rs +++ b/crates/nu-protocol/src/value/mod.rs @@ -608,7 +608,7 @@ impl Value { Value::Nothing { span } } - /// Follow a given column path into the value: for example accessing select elements in a stream or list + /// Follow a given cell path into the value: for example accessing select elements in a stream or list pub fn follow_cell_path( self, cell_path: &[PathMember], @@ -750,7 +750,7 @@ impl Value { Ok(current) } - /// Follow a given column path into the value: for example accessing select elements in a stream or list + /// Follow a given cell path into the value: for example accessing select elements in a stream or list pub fn upsert_cell_path( &mut self, cell_path: &[PathMember], @@ -863,7 +863,7 @@ impl Value { Ok(()) } - /// Follow a given column path into the value: for example accessing select elements in a stream or list + /// Follow a given cell path into the value: for example accessing select elements in a stream or list pub fn update_cell_path( &mut self, cell_path: &[PathMember],