Uniformize usage() and extra_usage() message ending for commands helper. (#8268)

# Description

Working on uniformizing the ending messages regarding methods usage()
and extra_usage(). This is related to the issue
https://github.com/nushell/nushell/issues/5066 after discussing it with
@jntrnr

# User-Facing Changes

None.

# Tests + Formatting

Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect` to check that you're using the standard code
style
- `cargo test --workspace` to check that all tests pass

# After Submitting

If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
This commit is contained in:
Jérémy Audiger
2023-03-01 06:33:02 +01:00
committed by GitHub
parent 644164fab3
commit a5c604c283
268 changed files with 278 additions and 278 deletions

View File

@ -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 {

View File

@ -11,7 +11,7 @@ impl Command for Break {
}
fn usage(&self) -> &str {
"Break a loop"
"Break a loop."
}
fn signature(&self) -> nu_protocol::Signature {

View File

@ -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> {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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(

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -11,7 +11,7 @@ impl Command for Register {
}
fn usage(&self) -> &str {
"Register a plugin"
"Register a plugin."
}
fn signature(&self) -> nu_protocol::Signature {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {