mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00:00
Improve wording of str replace
help messages (#7708)
# Description See title. # User-Facing Changes See title. # 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:
parent
f609a4f26a
commit
3a59ab9f14
1 changed files with 4 additions and 4 deletions
|
@ -36,21 +36,21 @@ impl Command for SubCommand {
|
||||||
.input_output_types(vec![(Type::String, Type::String)])
|
.input_output_types(vec![(Type::String, Type::String)])
|
||||||
.vectorizes_over_list(true)
|
.vectorizes_over_list(true)
|
||||||
.required("find", SyntaxShape::String, "the pattern to find")
|
.required("find", SyntaxShape::String, "the pattern to find")
|
||||||
.required("replace", SyntaxShape::String, "the replacement pattern")
|
.required("replace", SyntaxShape::String, "the replacement string")
|
||||||
.rest(
|
.rest(
|
||||||
"rest",
|
"rest",
|
||||||
SyntaxShape::CellPath,
|
SyntaxShape::CellPath,
|
||||||
"For a data structure input, operate on strings at the given cell paths",
|
"For a data structure input, operate on strings at the given cell paths",
|
||||||
)
|
)
|
||||||
.switch("all", "replace all occurrences of find string", Some('a'))
|
.switch("all", "replace all occurrences of the pattern", Some('a'))
|
||||||
.switch(
|
.switch(
|
||||||
"no-expand",
|
"no-expand",
|
||||||
"do not expand the replace parameter as a regular expression",
|
"do not expand capture groups (like $name) in the replacement string",
|
||||||
Some('n'),
|
Some('n'),
|
||||||
)
|
)
|
||||||
.switch(
|
.switch(
|
||||||
"string",
|
"string",
|
||||||
"do not use regular expressions for string find and replace",
|
"match the pattern as a substring of the input, instead of a regular expression",
|
||||||
Some('s'),
|
Some('s'),
|
||||||
)
|
)
|
||||||
.category(Category::Strings)
|
.category(Category::Strings)
|
||||||
|
|
Loading…
Reference in a new issue