From 1adebefc3ea5dd996a3ae53e398b5cc9e6f6a602 Mon Sep 17 00:00:00 2001 From: Stefan Holderbach Date: Thu, 8 Sep 2022 15:45:01 +0200 Subject: [PATCH] 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> --- crates/nu-command/src/filters/all.rs | 6 +++--- crates/nu-command/src/filters/any.rs | 6 +++--- 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 0fab9101eb..6e3ec49dad 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 { diff --git a/crates/nu-command/src/filters/any.rs b/crates/nu-command/src/filters/any.rs index b0a2592563..4a641136dd 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 {