forked from extern/nushell
Update trim_.rs (#8201)
fix typo in help messages # Description _(Thank you for improving Nushell. Please, check our [contributing guide](../CONTRIBUTING.md) and talk to the core team before making major changes.)_ _(Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience.)_ # User-Facing Changes _(List of all changes that impact the user experience here. This helps us keep track of breaking changes.)_ # 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. --------- Co-authored-by: Reilly Wood <reilly.wood@icloud.com>
This commit is contained in:
parent
7c285750c7
commit
b1e7bb899a
@ -44,7 +44,8 @@ impl Command for SubCommand {
|
|||||||
.rest(
|
.rest(
|
||||||
"rest",
|
"rest",
|
||||||
SyntaxShape::CellPath,
|
SyntaxShape::CellPath,
|
||||||
"For a data structure input, trim strings at the given cell paths", )
|
"For a data structure input, trim strings at the given cell paths",
|
||||||
|
)
|
||||||
.named(
|
.named(
|
||||||
"char",
|
"char",
|
||||||
SyntaxShape::String,
|
SyntaxShape::String,
|
||||||
@ -53,21 +54,29 @@ impl Command for SubCommand {
|
|||||||
)
|
)
|
||||||
.switch(
|
.switch(
|
||||||
"left",
|
"left",
|
||||||
"trims characters only from the beginning of the string (default: whitespace)",
|
"trims characters only from the beginning of the string",
|
||||||
Some('l'),
|
Some('l'),
|
||||||
)
|
)
|
||||||
.switch(
|
.switch(
|
||||||
"right",
|
"right",
|
||||||
"trims characters only from the end of the string (default: whitespace)",
|
"trims characters only from the end of the string",
|
||||||
Some('r'),
|
Some('r'),
|
||||||
)
|
)
|
||||||
.switch(
|
.switch(
|
||||||
"all",
|
"all",
|
||||||
"trims all characters from both sides of the string *and* in the middle (default: whitespace)",
|
"trims all characters from both sides of the string *and* in the middle",
|
||||||
Some('a'),
|
Some('a'),
|
||||||
)
|
)
|
||||||
.switch("both", "trims all characters from left and right side of the string (default: whitespace)", Some('b'))
|
.switch(
|
||||||
.switch("format", "trims spaces replacing multiple characters with singles in the middle (default: whitespace)", Some('f'))
|
"both",
|
||||||
|
"trims all characters from left and right side of the string",
|
||||||
|
Some('b'),
|
||||||
|
)
|
||||||
|
.switch(
|
||||||
|
"format",
|
||||||
|
"trims spaces replacing multiple characters with singles in the middle",
|
||||||
|
Some('f'),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
fn usage(&self) -> &str {
|
fn usage(&self) -> &str {
|
||||||
"Trim whitespace or specific character"
|
"Trim whitespace or specific character"
|
||||||
|
Loading…
Reference in New Issue
Block a user