summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Holderbach <sholderbach@users.noreply.github.com>2022-09-08 15:45:01 +0200
committerGitHub <noreply@github.com>2022-09-08 08:45:01 -0500
commit1adebefc3ea5dd996a3ae53e398b5cc9e6f6a602 (patch)
treeb7cb0af50fb639398a292ace9c745df1e0e72c31
parentd1e1d0ac3e3d84619121fda58a016207d149a951 (diff)
Improve wording around `all` and `any` (#6524)
* Improve wording around `all` and `any` The role of the `predicate` for `all` and `any` was not as clear. See #6499 * type-o * type-o Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
-rw-r--r--crates/nu-command/src/filters/all.rs6
-rw-r--r--crates/nu-command/src/filters/any.rs6
2 files changed, 6 insertions, 6 deletions
diff --git a/crates/nu-command/src/filters/all.rs b/crates/nu-command/src/filters/all.rs
index 0fab9101e..6e3ec49da 100644
--- a/crates/nu-command/src/filters/all.rs
+++ b/crates/nu-command/src/filters/all.rs
@@ -18,17 +18,17 @@ impl Command for All {
.required(
"predicate",
SyntaxShape::RowCondition,
- "the predicate that must match",
+ "the predicate expression that must evaluate to a boolean",
)
.category(Category::Filters)
}
fn usage(&self) -> &str {
- "Test if every element of the input matches a predicate."
+ "Test if every element of the input fulfills a predicate expression."
}
fn search_terms(&self) -> Vec<&str> {
- vec!["every"]
+ vec!["every", "and"]
}
fn examples(&self) -> Vec<Example> {
diff --git a/crates/nu-command/src/filters/any.rs b/crates/nu-command/src/filters/any.rs
index b0a259256..4a641136d 100644
--- a/crates/nu-command/src/filters/any.rs
+++ b/crates/nu-command/src/filters/any.rs
@@ -18,17 +18,17 @@ impl Command for Any {
.required(
"predicate",
SyntaxShape::RowCondition,
- "the predicate that must match",
+ "the predicate expression that should return a boolean",
)
.category(Category::Filters)
}
fn usage(&self) -> &str {
- "Tests if any element of the input matches a predicate."
+ "Tests if any element of the input fulfills a predicate expression."
}
fn search_terms(&self) -> Vec<&str> {
- vec!["some"]
+ vec!["some", "or"]
}
fn examples(&self) -> Vec<Example> {