Change the usage misnomer to "description" (#13598)

# Description
    
The meaning of the word usage is specific to describing how a command
function is *used* and not a synonym for general description. Usage can
be used to describe the SYNOPSIS or EXAMPLES sections of a man page
where the permitted argument combinations are shown or example *uses*
are given.
Let's not confuse people and call it what it is a description.

Our `help` command already creates its own *Usage* section based on the
available arguments and doesn't refer to the description with usage.

# User-Facing Changes

`help commands` and `scope commands` will now use `description` or
`extra_description`
`usage`-> `description`
`extra_usage` -> `extra_description`

Breaking change in the plugin protocol:

In the signature record communicated with the engine.
`usage`-> `description`
`extra_usage` -> `extra_description`

The same rename also takes place for the methods on
`SimplePluginCommand` and `PluginCommand`

# Tests + Formatting
- Updated plugin protocol specific changes
# After Submitting
- [ ] update plugin protocol doc
This commit is contained in:
Stefan Holderbach
2024-08-22 12:02:08 +02:00
committed by GitHub
parent 3ab9f0b90a
commit 95b78eee25
597 changed files with 1085 additions and 1039 deletions

View File

@ -51,7 +51,7 @@ impl Command for BytesAdd {
.category(Category::Bytes)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Add specified bytes to the input."
}

View File

@ -53,7 +53,7 @@ impl Command for BytesAt {
.category(Category::Bytes)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Get bytes defined by a range."
}

View File

@ -8,7 +8,7 @@ impl Command for BytesBuild {
"bytes build"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Create bytes from the arguments."
}

View File

@ -14,11 +14,11 @@ impl Command for Bytes {
.input_output_types(vec![(Type::Nothing, Type::String)])
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Various commands for working with byte data."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"You must use one of the following subcommands. Using this command as-is will only produce this help message."
}

View File

@ -20,7 +20,7 @@ impl Command for BytesCollect {
.category(Category::Bytes)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Concatenate multiple binary into a single binary, with an optional separator between each."
}

View File

@ -41,7 +41,7 @@ impl Command for BytesEndsWith {
.category(Category::Bytes)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Check if bytes ends with a pattern."
}

View File

@ -47,7 +47,7 @@ impl Command for BytesIndexOf {
.category(Category::Bytes)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Returns start index of first occurrence of pattern in bytes, or -1 if no match."
}

View File

@ -29,7 +29,7 @@ impl Command for BytesLen {
.category(Category::Bytes)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Output the length of any bytes in the pipeline."
}

View File

@ -40,7 +40,7 @@ impl Command for BytesRemove {
.category(Category::Bytes)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Remove bytes."
}

View File

@ -41,7 +41,7 @@ impl Command for BytesReplace {
.category(Category::Bytes)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Find and replace binary."
}

View File

@ -25,7 +25,7 @@ impl Command for BytesReverse {
.category(Category::Bytes)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Reverse the bytes in the pipeline."
}

View File

@ -39,7 +39,7 @@ impl Command for BytesStartsWith {
.category(Category::Bytes)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Check if bytes starts with a pattern."
}

View File

@ -26,7 +26,7 @@ impl Command for Histogram {
.category(Category::Chart)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Creates a new table with a histogram based on the column name passed in."
}

View File

@ -32,7 +32,7 @@ impl Command for Fill {
"fill"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Fill and Align."
}

View File

@ -43,7 +43,7 @@ impl Command for SubCommand {
.category(Category::Conversions)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Convert value to a binary primitive."
}

View File

@ -29,7 +29,7 @@ impl Command for SubCommand {
.category(Category::Conversions)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Convert value to boolean."
}

View File

@ -25,7 +25,7 @@ impl Command for IntoCellPath {
.allow_variants_without_examples(true)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Convert value to a cell-path."
}
@ -33,7 +33,7 @@ impl Command for IntoCellPath {
vec!["convert"]
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"Converting a string directly into a cell path is intentionally not supported."
}

View File

@ -14,11 +14,11 @@ impl Command for Into {
.input_output_types(vec![(Type::Nothing, Type::String)])
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Commands to convert data from one type to another."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"You must use one of the following subcommands. Using this command as-is will only produce this help message."
}

View File

@ -145,7 +145,7 @@ impl Command for SubCommand {
}
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Convert text or timestamp into a datetime."
}

View File

@ -36,11 +36,11 @@ impl Command for SubCommand {
.category(Category::Conversions)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Convert value to duration."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"Max duration value is i64::MAX nanoseconds; max duration time unit is wk (weeks)."
}

View File

@ -51,7 +51,7 @@ impl Command for SubCommand {
.category(Category::Conversions)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Convert value to filesize."
}

View File

@ -32,7 +32,7 @@ impl Command for SubCommand {
.category(Category::Conversions)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Convert data into floating point number."
}

View File

@ -39,7 +39,7 @@ impl Command for SubCommand {
.category(Category::Conversions)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Convert value to glob."
}

View File

@ -89,7 +89,7 @@ impl Command for SubCommand {
.category(Category::Conversions)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Convert value to integer."
}

View File

@ -21,7 +21,7 @@ impl Command for SubCommand {
.category(Category::Conversions)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Convert value to record."
}

View File

@ -60,7 +60,7 @@ impl Command for SubCommand {
.category(Category::Conversions)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Convert value to string."
}

View File

@ -31,7 +31,7 @@ impl Command for IntoValue {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Infer nushell datatype for each cell."
}

View File

@ -46,7 +46,7 @@ impl Command for IntoSqliteDb {
operate(engine_state, stack, call, input)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Convert table into a SQLite database."
}

View File

@ -27,7 +27,7 @@ impl Command for QueryDb {
.category(Category::Database)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Query a database using SQL."
}

View File

@ -17,7 +17,7 @@ impl Command for SchemaDb {
.category(Category::Database)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Show the schema of a SQLite database."
}

View File

@ -14,11 +14,11 @@ impl Command for Date {
.input_output_types(vec![(Type::Nothing, Type::String)])
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Date-related commands."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"You must use one of the following subcommands. Using this command as-is will only produce this help message."
}

View File

@ -21,7 +21,7 @@ impl Command for SubCommand {
.category(Category::Date)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Print a 'humanized' format for the date, relative to now."
}

View File

@ -15,7 +15,7 @@ impl Command for SubCommand {
.category(Category::Date)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"List supported time zones."
}

View File

@ -15,7 +15,7 @@ impl Command for SubCommand {
.category(Category::Date)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Get the current date."
}

View File

@ -20,7 +20,7 @@ impl Command for SubCommand {
.category(Category::Date)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Convert the date into a record."
}

View File

@ -20,7 +20,7 @@ impl Command for SubCommand {
.category(Category::Date)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Convert the date into a structured table."
}

View File

@ -19,11 +19,11 @@ impl Command for SubCommand {
.category(Category::Date)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Convert a date to a given time zone."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"Use 'date list-timezone' to list all supported time zones."
}

View File

@ -10,7 +10,7 @@ impl Command for Ast {
"ast"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Print the abstract syntax tree (ast) for a pipeline."
}

View File

@ -8,7 +8,7 @@ impl Command for Debug {
"debug"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Debug print the value(s) piped in."
}

View File

@ -12,7 +12,7 @@ impl Command for Explain {
"explain"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Explain closure contents."
}

View File

@ -20,11 +20,11 @@ impl Command for DebugInfo {
"debug info"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"View process memory info."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"This command is meant for debugging purposes.\nIt shows you the process information and system memory information."
}

View File

@ -10,7 +10,7 @@ impl Command for Inspect {
"inspect"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Inspect pipeline results while running a pipeline."
}

View File

@ -12,7 +12,7 @@ impl Command for Metadata {
"metadata"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Get the metadata for items in the stream."
}

View File

@ -9,7 +9,7 @@ impl Command for MetadataSet {
"metadata set"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Set the metadata for items in the stream."
}

View File

@ -43,11 +43,11 @@ impl Command for DebugProfile {
.category(Category::Debug)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Profile pipeline elements in a closure."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
r#"The profiler profiles every evaluated pipeline element inside a closure, stepping into all
commands calls and other blocks/closures.

View File

@ -9,7 +9,7 @@ impl Command for TimeIt {
"timeit"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Time the running time of a block."
}

View File

@ -14,11 +14,11 @@ impl Command for View {
.input_output_types(vec![(Type::Nothing, Type::String)])
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Various commands for viewing debug information."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"You must use one of the following subcommands. Using this command as-is will only produce this help message."
}

View File

@ -8,11 +8,11 @@ impl Command for ViewFiles {
"view files"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"View the files registered in nushell's EngineState memory."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"These are files parsed and loaded at runtime."
}

View File

@ -29,11 +29,11 @@ impl Command for ViewIr {
.category(Category::Debug)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"View the compiled IR code for a block of code."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"
The target can be a closure, the name of a custom command, or an internal block
ID. Closure literals within IR dumps often reference the block by ID (e.g.

View File

@ -11,7 +11,7 @@ impl Command for ViewSource {
"view source"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"View a block, module, or a definition."
}

View File

@ -8,11 +8,11 @@ impl Command for ViewSpan {
"view span"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"View the contents of a span."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"This command is meant for debugging purposes.\nIt allows you to view the contents of nushell spans.\nOne way to get spans is to pipe something into 'debug --raw'.\nThen you can use the Span { start, end } values as the start and end values for this command."
}

View File

@ -14,11 +14,11 @@ impl Command for ConfigMeta {
.input_output_types(vec![(Type::Nothing, Type::String)])
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Edit nushell configuration files."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"You must use one of the following subcommands. Using this command as-is will only produce this help message."
}

View File

@ -19,7 +19,7 @@ impl Command for ConfigEnv {
// TODO: Signature narrower than what run actually supports theoretically
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Edit nu environment configurations."
}

View File

@ -23,7 +23,7 @@ impl Command for ConfigNu {
// TODO: Signature narrower than what run actually supports theoretically
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Edit nu configurations."
}

View File

@ -22,7 +22,7 @@ impl Command for ConfigReset {
.category(Category::Env)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Reset nushell environment configurations to default, and saves old config files in the config location as oldconfig.nu and oldenv.nu."
}

View File

@ -20,11 +20,11 @@ impl Command for ExportEnv {
.category(Category::Env)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Run a block and preserve its environment in a current scope."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
r#"This command is a parser keyword. For details, check:
https://www.nushell.sh/book/thinking_in_nu.html"#
}

View File

@ -8,7 +8,7 @@ impl Command for LoadEnv {
"load-env"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Loads an environment update from a record."
}

View File

@ -25,11 +25,11 @@ impl Command for SourceEnv {
.category(Category::Core)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Source the environment from a source file into the current environment."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
r#"This command is a parser keyword. For details, check:
https://www.nushell.sh/book/thinking_in_nu.html"#
}

View File

@ -25,7 +25,7 @@ impl Command for WithEnv {
.category(Category::Env)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Runs a block with an environment variable set."
}

View File

@ -8,7 +8,7 @@ impl Command for IsAdmin {
"is-admin"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Check if nushell is running with administrator or root privileges."
}

View File

@ -10,7 +10,7 @@ impl Command for Cd {
"cd"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Change directory."
}

View File

@ -27,7 +27,7 @@ impl Command for Du {
"du"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Find disk usage sizes of specified items."
}

View File

@ -44,7 +44,7 @@ impl Command for Glob {
.category(Category::FileSystem)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Creates a list of files and/or folders based on the glob pattern provided."
}
@ -114,7 +114,7 @@ impl Command for Glob {
]
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
r#"For more glob pattern help, please refer to https://docs.rs/crate/wax/latest"#
}

View File

@ -38,7 +38,7 @@ impl Command for Ls {
"ls"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"List the filenames, sizes, and modification times of items in a directory."
}

View File

@ -10,7 +10,7 @@ impl Command for Mktemp {
"mktemp"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Create temporary files or directories using uutils/coreutils mktemp."
}

View File

@ -18,11 +18,11 @@ impl Command for Open {
"open"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Load a file into a cell, converting to table if possible (avoid by appending '--raw')."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"Support to automatically parse files with an extension `.xyz` can be provided by a `from xyz` command in scope."
}

View File

@ -25,7 +25,7 @@ impl Command for Rm {
"rm"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Remove files and directories."
}

View File

@ -22,7 +22,7 @@ impl Command for Save {
"save"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Save a file."
}

View File

@ -15,7 +15,7 @@ impl Command for Start {
"start"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Open a folder, file or website in the default application or viewer."
}

View File

@ -51,7 +51,7 @@ impl Command for Touch {
.category(Category::FileSystem)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Creates one or more files."
}

View File

@ -20,7 +20,7 @@ impl Command for UCp {
"cp"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Copy files using uutils/coreutils cp."
}

View File

@ -28,7 +28,7 @@ impl Command for UMkdir {
"mkdir"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Create directories, with intermediary directories if required using uutils/coreutils mkdir."
}

View File

@ -14,7 +14,7 @@ impl Command for UMv {
"mv"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Move files or directories using uutils/coreutils mv."
}

View File

@ -28,7 +28,7 @@ impl Command for Watch {
"watch"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Watch for file changes and execute Nu code when they happen."
}

View File

@ -20,7 +20,7 @@ impl Command for All {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Test if every element of the input fulfills a predicate expression."
}

View File

@ -20,7 +20,7 @@ impl Command for Any {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Tests if any element of the input fulfills a predicate expression."
}

View File

@ -20,11 +20,11 @@ impl Command for Append {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Append any number of rows to a table."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
r#"Be aware that this command 'unwraps' lists passed to it. So, if you pass a variable to it,
and you want the variable's contents to be appended without being unwrapped, it's wise to
pre-emptively wrap the variable in a list, like so: `append [$val]`. This way, `append` will

View File

@ -20,11 +20,11 @@ impl Command for Chunks {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Divide a list or table into chunks of `chunk_size`."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"This command will error if `chunk_size` is negative or zero."
}

View File

@ -17,11 +17,11 @@ impl Command for Columns {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Given a record or table, produce a list of its columns' names."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"This is a counterpart to `values`, which produces a list of columns' values."
}

View File

@ -27,7 +27,7 @@ impl Command for Compact {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Creates a table with non-empty rows."
}

View File

@ -26,7 +26,7 @@ impl Command for Default {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Sets a default value if a row's column is missing or null."
}

View File

@ -24,7 +24,7 @@ impl Command for DropColumn {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Remove N columns at the right-hand end of the input table. To remove columns by name, use `reject`."
}

View File

@ -21,7 +21,7 @@ impl Command for Drop {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Remove items/rows from the end of the input list/table. Counterpart of `skip`. Opposite of `last`."
}

View File

@ -27,7 +27,7 @@ impl Command for DropNth {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Drop the selected rows."
}

View File

@ -10,11 +10,11 @@ impl Command for Each {
"each"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Run a closure on each row of the input list, creating a new list with the results."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
r#"Since tables are lists of records, passing a table into 'each' will
iterate over each record, not necessarily each cell within it.

View File

@ -8,7 +8,7 @@ impl Command for Enumerate {
"enumerate"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Enumerate the elements in a stream."
}

View File

@ -27,7 +27,7 @@ impl Command for Every {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Show (or skip) every n-th row, starting from the first one."
}

View File

@ -10,11 +10,11 @@ impl Command for Filter {
"filter"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Filter values based on a predicate closure."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
r#"This command works similar to 'where' but allows reading the predicate closure from
a variable. On the other hand, the "row condition" syntax is not supported."#
}

View File

@ -57,7 +57,7 @@ impl Command for Find {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Searches terms in the input."
}

View File

@ -31,7 +31,7 @@ impl Command for First {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Return only the first several rows of the input. Counterpart of `last`. Opposite of `skip`."
}

View File

@ -28,7 +28,7 @@ impl Command for Flatten {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Flatten the table."
}

View File

@ -8,11 +8,11 @@ impl Command for Get {
"get"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Extract data using a cell path."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
r#"This is equivalent to using the cell path access syntax: `$env.OS` is the same as `$env | get OS`.
If multiple cell paths are given, this will produce a list of values."#

View File

@ -23,7 +23,7 @@ impl Command for Group {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Groups input into groups of `group_size`."
}

View File

@ -34,7 +34,7 @@ impl Command for GroupBy {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Splits a list or table into groups, and returns a record containing those groups."
}

View File

@ -22,7 +22,7 @@ impl Command for Headers {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Use the first row of the table as column names."
}

View File

@ -33,11 +33,11 @@ impl Command for Insert {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Insert a new column, using an expression or closure to create each row's values."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"When inserting a column, the closure will be run for each row, and the current row will be passed as the first argument.
When inserting into a specific index, the closure will instead get the current value at the index or null if inserting at the end of a list/table."
}

View File

@ -10,11 +10,11 @@ impl Command for Interleave {
"interleave"
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Read multiple streams in parallel and combine them into one stream."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
r#"This combinator is useful for reading output from multiple commands.
If input is provided to `interleave`, the input will be combined with the

View File

@ -20,7 +20,7 @@ impl Command for IsEmpty {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Check for empty values."
}

View File

@ -20,7 +20,7 @@ impl Command for IsNotEmpty {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Check for non-empty values."
}

View File

@ -22,11 +22,11 @@ impl Command for Items {
.category(Category::Filters)
}
fn usage(&self) -> &str {
fn description(&self) -> &str {
"Given a record, iterate on each pair of column name and associated value."
}
fn extra_usage(&self) -> &str {
fn extra_description(&self) -> &str {
"This is a the fusion of `columns`, `values` and `each`."
}

Some files were not shown because too many files have changed in this diff Show More