Skip to content

Commit

Permalink
Uniformize usage() and extra_usage() message ending for commands helper.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaudiger committed Feb 28, 2023
1 parent ffc3727 commit 11ac5ef
Show file tree
Hide file tree
Showing 268 changed files with 278 additions and 278 deletions.
2 changes: 1 addition & 1 deletion crates/nu-cli/src/print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl Command for Print {
}

fn usage(&self) -> &str {
"Print the given values to stdout"
"Print the given values to stdout."
}

fn extra_usage(&self) -> &str {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/alias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl Command for Alias {
}

fn usage(&self) -> &str {
"Alias a command (with optional flags) to a new name"
"Alias a command (with optional flags) to a new name."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/break_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl Command for Break {
}

fn usage(&self) -> &str {
"Break a loop"
"Break a loop."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/commandline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl Command for Commandline {
}

fn usage(&self) -> &str {
"View or modify the current command line input buffer"
"View or modify the current command line input buffer."
}

fn search_terms(&self) -> Vec<&str> {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/continue_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl Command for Continue {
}

fn usage(&self) -> &str {
"Continue a loop from the next iteration"
"Continue a loop from the next iteration."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl Command for Def {
}

fn usage(&self) -> &str {
"Define a custom command"
"Define a custom command."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/def_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl Command for DefEnv {
}

fn usage(&self) -> &str {
"Define a custom command, which participates in the caller environment"
"Define a custom command, which participates in the caller environment."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/do_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl Command for Do {
}

fn usage(&self) -> &str {
"Run a closure, providing it with the pipeline input"
"Run a closure, providing it with the pipeline input."
}

fn signature(&self) -> Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/export_alias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl Command for ExportAlias {
}

fn usage(&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."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/export_def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl Command for ExportDef {
}

fn usage(&self) -> &str {
"Define a custom command and export it from a module"
"Define a custom command and export it from a module."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/export_def_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl Command for ExportDefEnv {
}

fn usage(&self) -> &str {
"Define a custom command that participates in the environment and export it from a module"
"Define a custom command that participates in the environment and export it from a module."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/export_extern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl Command for ExportExtern {
}

fn usage(&self) -> &str {
"Define an extern and export it from a module"
"Define an extern and export it from a module."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/export_use.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl Command for ExportUse {
}

fn usage(&self) -> &str {
"Use definitions from a module and export them from this module"
"Use definitions from a module and export them from this module."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/extern_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl Command for Extern {
}

fn usage(&self) -> &str {
"Define a signature for an external command"
"Define a signature for an external command."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/for_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ impl Command for For {
}

fn usage(&self) -> &str {
"Loop over a range"
"Loop over a range."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/hide.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl Command for Hide {
}

fn usage(&self) -> &str {
"Hide definitions in the current scope"
"Hide definitions in the current scope."
}

fn extra_usage(&self) -> &str {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/hide_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Command for HideEnv {
}

fn usage(&self) -> &str {
"Hide environment variables in the current scope"
"Hide environment variables in the current scope."
}

fn run(
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/ignore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl Command for Ignore {
}

fn usage(&self) -> &str {
"Ignore the output of the previous command in the pipeline"
"Ignore the output of the previous command in the pipeline."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl Command for Module {
}

fn usage(&self) -> &str {
"Define a custom module"
"Define a custom module."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/overlay/hide.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ impl Command for OverlayHide {
}

fn usage(&self) -> &str {
"Hide an active overlay"
"Hide an active overlay."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/overlay/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl Command for OverlayList {
}

fn usage(&self) -> &str {
"List all active overlays"
"List all active overlays."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/overlay/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ impl Command for OverlayNew {
}

fn usage(&self) -> &str {
"Create an empty overlay"
"Create an empty overlay."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/overlay/use_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl Command for OverlayUse {
}

fn usage(&self) -> &str {
"Use definitions from a module as an overlay"
"Use definitions from a module as an overlay."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl Command for Register {
}

fn usage(&self) -> &str {
"Register a plugin"
"Register a plugin."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/return_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ impl Command for Return {
}

fn usage(&self) -> &str {
"Return early from a function"
"Return early from a function."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/try_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ impl Command for Try {
}

fn usage(&self) -> &str {
"Try to run a block, if it fails optionally run a catch block"
"Try to run a block, if it fails optionally run a catch block."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-cmd-lang/src/core_commands/use_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ impl Command for Use {
}

fn usage(&self) -> &str {
"Use definitions from a module"
"Use definitions from a module."
}

fn signature(&self) -> nu_protocol::Signature {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bits/and.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Command for SubCommand {
}

fn usage(&self) -> &str {
"Performs bitwise and for integers"
"Performs bitwise and for integers."
}

fn search_terms(&self) -> Vec<&str> {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bits/bits_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl Command for Bits {
}

fn usage(&self) -> &str {
"Various commands for working with bits"
"Various commands for working with bits."
}

fn extra_usage(&self) -> &str {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bits/not.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl Command for SubCommand {
}

fn usage(&self) -> &str {
"Performs logical negation on each bit"
"Performs logical negation on each bit."
}

fn search_terms(&self) -> Vec<&str> {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bits/or.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Command for SubCommand {
}

fn usage(&self) -> &str {
"Performs bitwise or for integers"
"Performs bitwise or for integers."
}

fn search_terms(&self) -> Vec<&str> {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bits/rotate_left.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl Command for SubCommand {
}

fn usage(&self) -> &str {
"Bitwise rotate left for integers"
"Bitwise rotate left for integers."
}

fn search_terms(&self) -> Vec<&str> {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bits/rotate_right.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl Command for SubCommand {
}

fn usage(&self) -> &str {
"Bitwise rotate right for integers"
"Bitwise rotate right for integers."
}

fn search_terms(&self) -> Vec<&str> {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bits/shift_left.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl Command for SubCommand {
}

fn usage(&self) -> &str {
"Bitwise shift left for integers"
"Bitwise shift left for integers."
}

fn search_terms(&self) -> Vec<&str> {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bits/shift_right.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl Command for SubCommand {
}

fn usage(&self) -> &str {
"Bitwise shift right for integers"
"Bitwise shift right for integers."
}

fn search_terms(&self) -> Vec<&str> {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bits/xor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Command for SubCommand {
}

fn usage(&self) -> &str {
"Performs bitwise xor for integers"
"Performs bitwise xor for integers."
}

fn search_terms(&self) -> Vec<&str> {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bytes/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Command for BytesAdd {
}

fn usage(&self) -> &str {
"Add specified bytes to the input"
"Add specified bytes to the input."
}

fn search_terms(&self) -> Vec<&str> {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bytes/bytes_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl Command for Bytes {
}

fn usage(&self) -> &str {
"Various commands for working with byte data"
"Various commands for working with byte data."
}

fn extra_usage(&self) -> &str {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bytes/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Command for BytesCollect {
}

fn usage(&self) -> &str {
"Concatenate multiple binary into a single binary, with an optional separator between each"
"Concatenate multiple binary into a single binary, with an optional separator between each."
}

fn search_terms(&self) -> Vec<&str> {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bytes/ends_with.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl Command for BytesEndsWith {
}

fn usage(&self) -> &str {
"Check if bytes ends with a pattern"
"Check if bytes ends with a pattern."
}

fn search_terms(&self) -> Vec<&str> {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bytes/index_of.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Command for BytesIndexOf {
}

fn usage(&self) -> &str {
"Returns start index of first occurrence of pattern in bytes, or -1 if no match"
"Returns start index of first occurrence of pattern in bytes, or -1 if no match."
}

fn search_terms(&self) -> Vec<&str> {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bytes/length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl Command for BytesLen {
}

fn usage(&self) -> &str {
"Output the length of any bytes in the pipeline"
"Output the length of any bytes in the pipeline."
}

fn search_terms(&self) -> Vec<&str> {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bytes/remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Command for BytesRemove {
}

fn usage(&self) -> &str {
"Remove bytes"
"Remove bytes."
}

fn search_terms(&self) -> Vec<&str> {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/bytes/replace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Command for BytesReplace {
}

fn usage(&self) -> &str {
"Find and replace binary"
"Find and replace binary."
}

fn search_terms(&self) -> Vec<&str> {
Expand Down

0 comments on commit 11ac5ef

Please sign in to comment.