mirror of
https://github.com/nushell/nushell
synced 2024-12-26 04:53:09 +00:00
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:
parent
3ab9f0b90a
commit
95b78eee25
597 changed files with 1085 additions and 1039 deletions
|
@ -14,7 +14,7 @@ impl Command for Commandline {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"View the current command line input buffer."
|
"View the current command line input buffer."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Modify the current command line input buffer."
|
"Modify the current command line input buffer."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Get the current cursor position."
|
"Get the current cursor position."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Set the current cursor position."
|
"Set the current cursor position."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ impl Command for History {
|
||||||
"history"
|
"history"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Get the command history."
|
"Get the command history."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ impl Command for HistorySession {
|
||||||
"history session"
|
"history session"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Get the command history session."
|
"Get the command history session."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,11 @@ impl Command for Keybindings {
|
||||||
.input_output_types(vec![(Type::Nothing, Type::String)])
|
.input_output_types(vec![(Type::Nothing, Type::String)])
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Keybindings related commands."
|
"Keybindings related commands."
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"You must use one of the following subcommands. Using this command as-is will only produce this help message.
|
r#"You must use one of the following subcommands. Using this command as-is will only produce this help message.
|
||||||
|
|
||||||
For more information on input and keybindings, check:
|
For more information on input and keybindings, check:
|
||||||
|
|
|
@ -15,7 +15,7 @@ impl Command for KeybindingsDefault {
|
||||||
.input_output_types(vec![(Type::Nothing, Type::table())])
|
.input_output_types(vec![(Type::Nothing, Type::table())])
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"List default keybindings."
|
"List default keybindings."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ impl Command for KeybindingsList {
|
||||||
.category(Category::Platform)
|
.category(Category::Platform)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"List available options that can be used to create keybindings."
|
"List available options that can be used to create keybindings."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,11 +12,11 @@ impl Command for KeybindingsListen {
|
||||||
"keybindings listen"
|
"keybindings listen"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Get input from the user."
|
"Get input from the user."
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
"This is an internal debugging tool. For better output, try `input listen --types [key]`"
|
"This is an internal debugging tool. For better output, try `input listen --types [key]`"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,12 +30,15 @@ impl NuHelpCompleter {
|
||||||
.filter_map(|(_, decl_id)| {
|
.filter_map(|(_, decl_id)| {
|
||||||
let decl = self.engine_state.get_decl(decl_id);
|
let decl = self.engine_state.get_decl(decl_id);
|
||||||
(decl.name().to_folded_case().contains(&folded_line)
|
(decl.name().to_folded_case().contains(&folded_line)
|
||||||
|| decl.usage().to_folded_case().contains(&folded_line)
|
|| decl.description().to_folded_case().contains(&folded_line)
|
||||||
|| decl
|
|| decl
|
||||||
.search_terms()
|
.search_terms()
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.any(|term| term.to_folded_case().contains(&folded_line))
|
.any(|term| term.to_folded_case().contains(&folded_line))
|
||||||
|| decl.extra_usage().to_folded_case().contains(&folded_line))
|
|| decl
|
||||||
|
.extra_description()
|
||||||
|
.to_folded_case()
|
||||||
|
.contains(&folded_line))
|
||||||
.then_some(decl)
|
.then_some(decl)
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
@ -47,15 +50,15 @@ impl NuHelpCompleter {
|
||||||
.map(|decl| {
|
.map(|decl| {
|
||||||
let mut long_desc = String::new();
|
let mut long_desc = String::new();
|
||||||
|
|
||||||
let usage = decl.usage();
|
let description = decl.description();
|
||||||
if !usage.is_empty() {
|
if !description.is_empty() {
|
||||||
long_desc.push_str(usage);
|
long_desc.push_str(description);
|
||||||
long_desc.push_str("\r\n\r\n");
|
long_desc.push_str("\r\n\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
let extra_usage = decl.extra_usage();
|
let extra_desc = decl.extra_description();
|
||||||
if !extra_usage.is_empty() {
|
if !extra_desc.is_empty() {
|
||||||
long_desc.push_str(extra_usage);
|
long_desc.push_str(extra_desc);
|
||||||
long_desc.push_str("\r\n\r\n");
|
long_desc.push_str("\r\n\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ impl Command for NuHighlight {
|
||||||
.input_output_types(vec![(Type::String, Type::String)])
|
.input_output_types(vec![(Type::String, Type::String)])
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Syntax highlight the input string."
|
"Syntax highlight the input string."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,11 +30,11 @@ impl Command for Print {
|
||||||
.category(Category::Strings)
|
.category(Category::Strings)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Print the given values to stdout."
|
"Print the given values to stdout."
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"Unlike `echo`, this command does not return any value (`print | describe` will return "nothing").
|
r#"Unlike `echo`, this command does not return any value (`print | describe` will return "nothing").
|
||||||
Since this command has no output, there is no point in piping it with other commands.
|
Since this command has no output, there is no point in piping it with other commands.
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ impl Command for BitsAnd {
|
||||||
.category(Category::Bits)
|
.category(Category::Bits)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Performs bitwise and for ints or binary values."
|
"Performs bitwise and for ints or binary values."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,11 @@ impl Command for Bits {
|
||||||
.input_output_types(vec![(Type::Nothing, Type::String)])
|
.input_output_types(vec![(Type::Nothing, Type::String)])
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Various commands for working with bits."
|
"Various commands for working with bits."
|
||||||
}
|
}
|
||||||
|
|
||||||
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."
|
"You must use one of the following subcommands. Using this command as-is will only produce this help message."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ impl Command for BitsInto {
|
||||||
.category(Category::Conversions)
|
.category(Category::Conversions)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Convert value to a binary primitive."
|
"Convert value to a binary primitive."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ impl Command for BitsNot {
|
||||||
.category(Category::Bits)
|
.category(Category::Bits)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Performs logical negation on each bit."
|
"Performs logical negation on each bit."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ impl Command for BitsOr {
|
||||||
.category(Category::Bits)
|
.category(Category::Bits)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Performs bitwise or for ints or binary values."
|
"Performs bitwise or for ints or binary values."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ impl Command for BitsRol {
|
||||||
.category(Category::Bits)
|
.category(Category::Bits)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Bitwise rotate left for ints or binary values."
|
"Bitwise rotate left for ints or binary values."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ impl Command for BitsRor {
|
||||||
.category(Category::Bits)
|
.category(Category::Bits)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Bitwise rotate right for ints or binary values."
|
"Bitwise rotate right for ints or binary values."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ impl Command for BitsShl {
|
||||||
.category(Category::Bits)
|
.category(Category::Bits)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Bitwise shift left for ints or binary values."
|
"Bitwise shift left for ints or binary values."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ impl Command for BitsShr {
|
||||||
.category(Category::Bits)
|
.category(Category::Bits)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Bitwise shift right for ints or binary values."
|
"Bitwise shift right for ints or binary values."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ impl Command for BitsXor {
|
||||||
.category(Category::Bits)
|
.category(Category::Bits)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Performs bitwise xor for ints or binary values."
|
"Performs bitwise xor for ints or binary values."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for Fmt {
|
||||||
"fmt"
|
"fmt"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Format a number."
|
"Format a number."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for EachWhile {
|
||||||
"each while"
|
"each while"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Run a closure on each row of the input list until a null is found, then create a new list with the results."
|
"Run a closure on each row of the input list until a null is found, then create a new list with the results."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,11 +18,11 @@ impl Command for Roll {
|
||||||
.input_output_types(vec![(Type::Nothing, Type::String)])
|
.input_output_types(vec![(Type::Nothing, Type::String)])
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Rolling commands for tables."
|
"Rolling commands for tables."
|
||||||
}
|
}
|
||||||
|
|
||||||
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."
|
"You must use one of the following subcommands. Using this command as-is will only produce this help message."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl Command for RollDown {
|
||||||
.category(Category::Filters)
|
.category(Category::Filters)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Roll table rows down."
|
"Roll table rows down."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ impl Command for RollLeft {
|
||||||
.category(Category::Filters)
|
.category(Category::Filters)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Roll record or table columns left."
|
"Roll record or table columns left."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ impl Command for RollRight {
|
||||||
.category(Category::Filters)
|
.category(Category::Filters)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Roll table columns right."
|
"Roll table columns right."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl Command for RollUp {
|
||||||
.category(Category::Filters)
|
.category(Category::Filters)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Roll table rows up."
|
"Roll table rows up."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ impl Command for Rotate {
|
||||||
.category(Category::Filters)
|
.category(Category::Filters)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Rotates a table or record clockwise (default) or counter-clockwise (use --ccw flag)."
|
"Rotates a table or record clockwise (default) or counter-clockwise (use --ccw flag)."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ impl Command for UpdateCells {
|
||||||
.category(Category::Filters)
|
.category(Category::Filters)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Update the table cells."
|
"Update the table cells."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ impl Command for FromUrl {
|
||||||
.category(Category::Formats)
|
.category(Category::Formats)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Parse url-encoded string as a record."
|
"Parse url-encoded string as a record."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -138,11 +138,11 @@ impl Command for ToHtml {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Convert table into simple HTML."
|
"Convert table into simple HTML."
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
"Screenshots of the themes can be browsed here: https://github.com/mbadolato/iTerm2-Color-Schemes."
|
"Screenshots of the themes can be browsed here: https://github.com/mbadolato/iTerm2-Color-Schemes."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Math)
|
.category(Category::Math)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Returns the arccosine of the number."
|
"Returns the arccosine of the number."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Math)
|
.category(Category::Math)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Returns the inverse of the hyperbolic cosine function."
|
"Returns the inverse of the hyperbolic cosine function."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Math)
|
.category(Category::Math)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Returns the arcsine of the number."
|
"Returns the arcsine of the number."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Math)
|
.category(Category::Math)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Returns the inverse of the hyperbolic sine function."
|
"Returns the inverse of the hyperbolic sine function."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Math)
|
.category(Category::Math)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Returns the arctangent of the number."
|
"Returns the arctangent of the number."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Math)
|
.category(Category::Math)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Returns the inverse of the hyperbolic tangent function."
|
"Returns the inverse of the hyperbolic tangent function."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Math)
|
.category(Category::Math)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Returns the cosine of the number."
|
"Returns the cosine of the number."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Math)
|
.category(Category::Math)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Returns the hyperbolic cosine of the number."
|
"Returns the hyperbolic cosine of the number."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Math)
|
.category(Category::Math)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Returns e raised to the power of x."
|
"Returns e raised to the power of x."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Math)
|
.category(Category::Math)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Returns the natural logarithm. Base: (math e)."
|
"Returns the natural logarithm. Base: (math e)."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Math)
|
.category(Category::Math)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Returns the sine of the number."
|
"Returns the sine of the number."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Math)
|
.category(Category::Math)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Returns the hyperbolic sine of the number."
|
"Returns the hyperbolic sine of the number."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Math)
|
.category(Category::Math)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Returns the tangent of the number."
|
"Returns the tangent of the number."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Math)
|
.category(Category::Math)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Returns the hyperbolic tangent of the number."
|
"Returns the hyperbolic tangent of the number."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Platform)
|
.category(Category::Platform)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Add a color gradient (using ANSI color codes) to the given string."
|
"Add a color gradient (using ANSI color codes) to the given string."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ impl Command for DecodeHex {
|
||||||
.category(Category::Formats)
|
.category(Category::Formats)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Hex decode a value."
|
"Hex decode a value."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ impl Command for EncodeHex {
|
||||||
.category(Category::Formats)
|
.category(Category::Formats)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Encode a binary value using hex."
|
"Encode a binary value using hex."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ impl Command for FormatPattern {
|
||||||
.category(Category::Strings)
|
.category(Category::Strings)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Format columns into a string using a simple pattern."
|
"Format columns into a string using a simple pattern."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Strings)
|
.category(Category::Strings)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Convert a string to camelCase."
|
"Convert a string to camelCase."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Strings)
|
.category(Category::Strings)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Convert a string to kebab-case."
|
"Convert a string to kebab-case."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Strings)
|
.category(Category::Strings)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Convert a string to PascalCase."
|
"Convert a string to PascalCase."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Strings)
|
.category(Category::Strings)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Convert a string to SCREAMING_SNAKE_CASE."
|
"Convert a string to SCREAMING_SNAKE_CASE."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Strings)
|
.category(Category::Strings)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Convert a string to snake_case."
|
"Convert a string to snake_case."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,11 @@ impl Command for Str {
|
||||||
.input_output_types(vec![(Type::Nothing, Type::String)])
|
.input_output_types(vec![(Type::Nothing, Type::String)])
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Various commands for working with string data."
|
"Various commands for working with string 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."
|
"You must use one of the following subcommands. Using this command as-is will only produce this help message."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ impl Command for SubCommand {
|
||||||
.category(Category::Strings)
|
.category(Category::Strings)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Convert a string to Title Case."
|
"Convert a string to Title Case."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for Alias {
|
||||||
"alias"
|
"alias"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Alias a command (with optional flags) to a new name."
|
"Alias a command (with optional flags) to a new name."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ impl Command for Alias {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for Break {
|
||||||
"break"
|
"break"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Break a loop."
|
"Break a loop."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ impl Command for Break {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html
|
https://www.nushell.sh/book/thinking_in_nu.html
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,11 @@ impl Command for Collect {
|
||||||
.category(Category::Filters)
|
.category(Category::Filters)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Collect a stream into a value."
|
"Collect a stream into a value."
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"If provided, run a closure with the collected value as input.
|
r#"If provided, run a closure with the collected value as input.
|
||||||
|
|
||||||
The entire stream will be collected into one value in memory, so if the stream
|
The entire stream will be collected into one value in memory, so if the stream
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for Const {
|
||||||
"const"
|
"const"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Create a parse-time constant."
|
"Create a parse-time constant."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ impl Command for Const {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for Continue {
|
||||||
"continue"
|
"continue"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Continue a loop from the next iteration."
|
"Continue a loop from the next iteration."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ impl Command for Continue {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html
|
https://www.nushell.sh/book/thinking_in_nu.html
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for Def {
|
||||||
"def"
|
"def"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Define a custom command."
|
"Define a custom command."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ impl Command for Def {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for Describe {
|
||||||
"describe"
|
"describe"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Describe the type and structure of the value(s) piped in."
|
"Describe the type and structure of the value(s) piped in."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ impl Command for Do {
|
||||||
"do"
|
"do"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Run a closure, providing it with the pipeline input."
|
"Run a closure, providing it with the pipeline input."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ impl Command for Echo {
|
||||||
"echo"
|
"echo"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Returns its arguments, ignoring the piped-in value."
|
"Returns its arguments, ignoring the piped-in value."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ impl Command for Echo {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"Unlike `print`, which prints unstructured text to stdout, `echo` is like an
|
r#"Unlike `print`, which prints unstructured text to stdout, `echo` is like an
|
||||||
identity function and simply returns its arguments. When given no arguments,
|
identity function and simply returns its arguments. When given no arguments,
|
||||||
it returns an empty string. When given one argument, it returns it as a
|
it returns an empty string. When given one argument, it returns it as a
|
||||||
|
|
|
@ -25,7 +25,7 @@ impl Command for ErrorMake {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Create an error."
|
"Create an error."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,11 @@ impl Command for ExportCommand {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Export definitions or environment variables from a module."
|
"Export definitions or environment variables from a module."
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for ExportAlias {
|
||||||
"export alias"
|
"export alias"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Alias a command (with optional flags) to a new name and export it from a module."
|
"Alias a command (with optional flags) to a new name and export it from a module."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ impl Command for ExportAlias {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for ExportConst {
|
||||||
"export const"
|
"export const"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Use parse-time constant from a module and export them from this module."
|
"Use parse-time constant from a module and export them from this module."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ impl Command for ExportConst {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for ExportDef {
|
||||||
"export def"
|
"export def"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Define a custom command and export it from a module."
|
"Define a custom command and export it from a module."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ impl Command for ExportDef {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for ExportExtern {
|
||||||
"export extern"
|
"export extern"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Define an extern and export it from a module."
|
"Define an extern and export it from a module."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ impl Command for ExportExtern {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for ExportModule {
|
||||||
"export module"
|
"export module"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Export a custom module from a module."
|
"Export a custom module from a module."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ impl Command for ExportModule {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for ExportUse {
|
||||||
"export use"
|
"export use"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Use definitions from a module and export them from this module."
|
"Use definitions from a module and export them from this module."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ impl Command for ExportUse {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for Extern {
|
||||||
"extern"
|
"extern"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Define a signature for an external command."
|
"Define a signature for an external command."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ impl Command for Extern {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for For {
|
||||||
"for"
|
"for"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Loop over a range."
|
"Loop over a range."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ impl Command for For {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,11 +21,11 @@ impl Command for Hide {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Hide definitions in the current scope."
|
"Hide definitions in the current scope."
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"Definitions are hidden by priority: First aliases, then custom commands.
|
r#"Definitions are hidden by priority: First aliases, then custom commands.
|
||||||
|
|
||||||
This command is a parser keyword. For details, check:
|
This command is a parser keyword. For details, check:
|
||||||
|
|
|
@ -25,7 +25,7 @@ impl Command for HideEnv {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Hide environment variables in the current scope."
|
"Hide environment variables in the current scope."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ impl Command for If {
|
||||||
"if"
|
"if"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Conditionally run a block."
|
"Conditionally run a block."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ impl Command for If {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for Ignore {
|
||||||
"ignore"
|
"ignore"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Ignore the output of the previous command in the pipeline."
|
"Ignore the output of the previous command in the pipeline."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for Let {
|
||||||
"let"
|
"let"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Create a variable and give it a value."
|
"Create a variable and give it a value."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ impl Command for Let {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for Loop {
|
||||||
"loop"
|
"loop"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Run a block in a loop."
|
"Run a block in a loop."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ impl Command for Loop {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ impl Command for Match {
|
||||||
"match"
|
"match"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Conditionally run a block on a matched value."
|
"Conditionally run a block on a matched value."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ impl Command for Match {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for Module {
|
||||||
"module"
|
"module"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Define a custom module."
|
"Define a custom module."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ impl Command for Module {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for Mut {
|
||||||
"mut"
|
"mut"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Create a mutable variable and give it a value."
|
"Create a mutable variable and give it a value."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ impl Command for Mut {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,11 +15,11 @@ impl Command for Overlay {
|
||||||
.input_output_types(vec![(Type::Nothing, Type::String)])
|
.input_output_types(vec![(Type::Nothing, Type::String)])
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Commands for manipulating overlays."
|
"Commands for manipulating overlays."
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html
|
https://www.nushell.sh/book/thinking_in_nu.html
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for OverlayHide {
|
||||||
"overlay hide"
|
"overlay hide"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Hide an active overlay."
|
"Hide an active overlay."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ impl Command for OverlayHide {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ impl Command for OverlayList {
|
||||||
"overlay list"
|
"overlay list"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"List all active overlays."
|
"List all active overlays."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ impl Command for OverlayList {
|
||||||
.input_output_types(vec![(Type::Nothing, Type::List(Box::new(Type::String)))])
|
.input_output_types(vec![(Type::Nothing, Type::List(Box::new(Type::String)))])
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
"The overlays are listed in the order they were activated."
|
"The overlays are listed in the order they were activated."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for OverlayNew {
|
||||||
"overlay new"
|
"overlay new"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Create an empty overlay."
|
"Create an empty overlay."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ impl Command for OverlayNew {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"The command will first create an empty module, then add it as an overlay.
|
r#"The command will first create an empty module, then add it as an overlay.
|
||||||
|
|
||||||
This command is a parser keyword. For details, check:
|
This command is a parser keyword. For details, check:
|
||||||
|
|
|
@ -14,7 +14,7 @@ impl Command for OverlayUse {
|
||||||
"overlay use"
|
"overlay use"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Use definitions from a module as an overlay."
|
"Use definitions from a module as an overlay."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ impl Command for OverlayUse {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ impl Command for Return {
|
||||||
"return"
|
"return"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Return early from a function."
|
"Return early from a function."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ impl Command for Return {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extra_usage(&self) -> &str {
|
fn extra_description(&self) -> &str {
|
||||||
r#"This command is a parser keyword. For details, check:
|
r#"This command is a parser keyword. For details, check:
|
||||||
https://www.nushell.sh/book/thinking_in_nu.html"#
|
https://www.nushell.sh/book/thinking_in_nu.html"#
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ impl Command for ScopeAliases {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Output info on the aliases in the current scope."
|
"Output info on the aliases in the current scope."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ impl Command for Scope {
|
||||||
.allow_variants_without_examples(true)
|
.allow_variants_without_examples(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Commands for getting info about what is in scope."
|
"Commands for getting info about what is in scope."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ impl Command for ScopeCommands {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Output info on the commands in the current scope."
|
"Output info on the commands in the current scope."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ impl Command for ScopeEngineStats {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Output stats on the engine in the current state."
|
"Output stats on the engine in the current state."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ impl Command for ScopeExterns {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Output info on the known externals in the current scope."
|
"Output info on the known externals in the current scope."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ impl Command for ScopeModules {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Output info on the modules in the current scope."
|
"Output info on the modules in the current scope."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ impl Command for ScopeVariables {
|
||||||
.category(Category::Core)
|
.category(Category::Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn usage(&self) -> &str {
|
fn description(&self) -> &str {
|
||||||
"Output info on the variables in the current scope."
|
"Output info on the variables in the current scope."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue