diff --git a/crates/nu-command/src/math/max.rs b/crates/nu-command/src/math/max.rs index fdfc993946..33c57717f5 100644 --- a/crates/nu-command/src/math/max.rs +++ b/crates/nu-command/src/math/max.rs @@ -15,7 +15,7 @@ impl Command for SubCommand { fn signature(&self) -> Signature { Signature::build("math max") .input_output_types(vec![ - (Type::List(Box::new(Type::Number)), Type::Number), + (Type::List(Box::new(Type::Any)), Type::Any), (Type::Table(vec![]), Type::Record(vec![])), ]) .allow_variants_without_examples(true) @@ -23,7 +23,7 @@ impl Command for SubCommand { } fn usage(&self) -> &str { - "Returns the maximum of a list of numbers, or of columns in a table." + "Returns the maximum of a list of values, or of columns in a table." } fn search_terms(&self) -> Vec<&str> { diff --git a/crates/nu-command/src/math/min.rs b/crates/nu-command/src/math/min.rs index 2cb3458125..e89f792200 100644 --- a/crates/nu-command/src/math/min.rs +++ b/crates/nu-command/src/math/min.rs @@ -15,7 +15,7 @@ impl Command for SubCommand { fn signature(&self) -> Signature { Signature::build("math min") .input_output_types(vec![ - (Type::List(Box::new(Type::Number)), Type::Number), + (Type::List(Box::new(Type::Any)), Type::Any), (Type::Table(vec![]), Type::Record(vec![])), ]) .allow_variants_without_examples(true) @@ -23,7 +23,7 @@ impl Command for SubCommand { } fn usage(&self) -> &str { - "Finds the minimum within a list of numbers or tables." + "Finds the minimum within a list of values or tables." } fn search_terms(&self) -> Vec<&str> { @@ -56,6 +56,11 @@ impl Command for SubCommand { span: Span::test_data(), }), }, + Example { + description: "Find the minimum of a list of arbitrary values (Warning: Weird)", + example: "[-50 'hello' true] | math min", + result: Some(Value::test_bool(true)), + }, ] } }