forked from extern/nushell
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:
committed by
GitHub
parent
3ab9f0b90a
commit
95b78eee25
@@ -528,11 +528,11 @@ impl Command for AnsiCommand {
|
||||
true
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Output ANSI codes to change color and style of text."
|
||||
}
|
||||
|
||||
fn extra_usage(&self) -> &str {
|
||||
fn extra_description(&self) -> &str {
|
||||
"An introduction to what ANSI escape sequences are can be found in the
|
||||
\u{1b}]8;;https://en.wikipedia.org/wiki/ANSI_escape_code\u{1b}\\ANSI escape code\u{1b}]8;;\u{1b}\\ Wikipedia page.
|
||||
|
||||
|
@@ -35,7 +35,7 @@ impl Command for SubCommand {
|
||||
.category(Category::Platform)
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Add a link (using OSC 8 escape sequence) to the given string."
|
||||
}
|
||||
|
||||
|
@@ -40,7 +40,7 @@ impl Command for SubCommand {
|
||||
.category(Category::Platform)
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Strip ANSI escape sequences from a string."
|
||||
}
|
||||
|
||||
|
@@ -15,7 +15,7 @@ impl Command for Clear {
|
||||
"clear"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Clear the terminal."
|
||||
}
|
||||
|
||||
|
@@ -18,7 +18,7 @@ impl Command for Input {
|
||||
"input"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Get input from the user."
|
||||
}
|
||||
|
||||
|
@@ -43,11 +43,11 @@ impl Command for InputListen {
|
||||
)])
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Listen for user interface event."
|
||||
}
|
||||
|
||||
fn extra_usage(&self) -> &str {
|
||||
fn extra_description(&self) -> &str {
|
||||
r#"There are 5 different type of events: focus, key, mouse, paste, resize. Each will produce a
|
||||
corresponding record, distinguished by type field:
|
||||
```
|
||||
|
@@ -54,11 +54,11 @@ impl Command for InputList {
|
||||
.category(Category::Platform)
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Interactive list selection."
|
||||
}
|
||||
|
||||
fn extra_usage(&self) -> &str {
|
||||
fn extra_description(&self) -> &str {
|
||||
"Abort with esc or q."
|
||||
}
|
||||
|
||||
|
@@ -18,7 +18,7 @@ impl Command for IsTerminal {
|
||||
.category(Category::Platform)
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Check if stdin, stdout, or stderr is a terminal."
|
||||
}
|
||||
|
||||
|
@@ -9,7 +9,7 @@ impl Command for Kill {
|
||||
"kill"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Kill a process using the process id."
|
||||
}
|
||||
|
||||
|
@@ -15,7 +15,7 @@ impl Command for Sleep {
|
||||
"sleep"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Delay for a specified amount of time."
|
||||
}
|
||||
|
||||
|
@@ -9,7 +9,7 @@ impl Command for TermSize {
|
||||
"term size"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Returns a record containing the number of columns (width) and rows (height) of the terminal."
|
||||
}
|
||||
|
||||
|
@@ -502,7 +502,7 @@ impl Command for ULimit {
|
||||
"ulimit"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Set or get resource usage limits."
|
||||
}
|
||||
|
||||
|
@@ -8,7 +8,7 @@ impl Command for Whoami {
|
||||
"whoami"
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
fn description(&self) -> &str {
|
||||
"Get the current username using uutils/coreutils whoami."
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user