mirror of
https://github.com/nushell/nushell.git
synced 2024-11-25 01:43:47 +01:00
Fix operator completion typo and increase consistency (#14006)
# Description * Fixes missing closing parenthesis on `not-in` completion Also tweaks the others to give them consistent capitalization and punctuation: * First word initial-case, other words lower-case * Exception - Initial-case for "also known as" after slash or inside parens * No closing period for any completion help * Word-smithing on others. E.g., "Mod" is technically "Remainder" # User-Facing Changes Operator completions # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` - # After Submitting N/A
This commit is contained in:
parent
b1379b2b14
commit
abcca0897e
@ -40,57 +40,81 @@ impl Completer for OperatorCompletion {
|
||||
};
|
||||
let possible_operations = match op {
|
||||
Expr::Int(_) => vec![
|
||||
("+", "Plus / Addition"),
|
||||
("-", "Minus / Subtraction"),
|
||||
("+", "Add (Plus)"),
|
||||
("-", "Subtract (Minus)"),
|
||||
("*", "Multiply"),
|
||||
("/", "Divide"),
|
||||
("==", "Equal"),
|
||||
("!=", "Not Equal"),
|
||||
("//", "Floor Division"),
|
||||
("<", "Less Than"),
|
||||
(">", "Greater Than"),
|
||||
("<=", "Less Than or Equal to"),
|
||||
(">=", "Greater Than or Equal to"),
|
||||
("mod", "Modulo"),
|
||||
("**", "Pow"),
|
||||
("bit-or", "bitwise or"),
|
||||
("bit-xor", "bitwise exclusive or"),
|
||||
("bit-and", "bitwise and"),
|
||||
("bit-shl", "bitwise shift left"),
|
||||
("bit-shr", "bitwise shift right"),
|
||||
],
|
||||
Expr::String(_) => vec![
|
||||
("=~", "Regex Match / Contains"),
|
||||
("!~", "Not Regex Match / Not Contains"),
|
||||
("in", "In / Contains (doesn't use regex)"),
|
||||
("==", "Equal to"),
|
||||
("!=", "Not equal to"),
|
||||
("//", "Floor division"),
|
||||
("<", "Less than"),
|
||||
(">", "Greater than"),
|
||||
("<=", "Less than or equal to"),
|
||||
(">=", "Greater than or equal to"),
|
||||
("mod", "Floor division remainder (Modulo)"),
|
||||
("**", "Power of"),
|
||||
("bit-or", "Bitwise OR"),
|
||||
("bit-xor", "Bitwise exclusive OR"),
|
||||
("bit-and", "Bitwise AND"),
|
||||
("bit-shl", "Bitwise shift left"),
|
||||
("bit-shr", "Bitwise shift right"),
|
||||
("in", "Is a member of (doesn't use regex)"),
|
||||
("not-in", "Is not a member of (doesn't use regex)"),
|
||||
(
|
||||
"++",
|
||||
"Appends two lists, a list and a value, two strings, or two binary values",
|
||||
),
|
||||
("not-in", "Not In / Not Contains (doesn't use regex"),
|
||||
("starts-with", "Starts With"),
|
||||
("ends-with", "Ends With"),
|
||||
],
|
||||
Expr::String(_) => vec![
|
||||
("=~", "Contains regex match"),
|
||||
("!~", "Does not contain regex match"),
|
||||
(
|
||||
"++",
|
||||
"Appends two lists, a list and a value, two strings, or two binary values",
|
||||
),
|
||||
("in", "Is a member of (doesn't use regex)"),
|
||||
("not-in", "Is not a member of (doesn't use regex)"),
|
||||
("starts-with", "Starts with"),
|
||||
("ends-with", "Ends with"),
|
||||
],
|
||||
Expr::Float(_) => vec![
|
||||
("+", "Plus / Addition"),
|
||||
("-", "Minus / Subtraction"),
|
||||
("+", "Add (Plus)"),
|
||||
("-", "Subtract (Minus)"),
|
||||
("*", "Multiply"),
|
||||
("/", "Divide"),
|
||||
("==", "Equal"),
|
||||
("!=", "Not Equal"),
|
||||
("//", "Floor Division"),
|
||||
("<", "Less Than"),
|
||||
(">", "Greater Than"),
|
||||
("<=", "Less Than or Equal to"),
|
||||
(">=", "Greater Than or Equal to"),
|
||||
("mod", "Modulo"),
|
||||
("**", "Pow"),
|
||||
("==", "Equal to"),
|
||||
("!=", "Not equal to"),
|
||||
("//", "Floor division"),
|
||||
("<", "Less than"),
|
||||
(">", "Greater than"),
|
||||
("<=", "Less than or equal to"),
|
||||
(">=", "Greater than or equal to"),
|
||||
("mod", "Floor division remainder (Modulo)"),
|
||||
("**", "Power of"),
|
||||
("in", "Is a member of (doesn't use regex)"),
|
||||
("not-in", "Is not a member of (doesn't use regex)"),
|
||||
(
|
||||
"++",
|
||||
"Appends two lists, a list and a value, two strings, or two binary values",
|
||||
),
|
||||
],
|
||||
Expr::Bool(_) => vec![
|
||||
("and", "Checks if both values are true."),
|
||||
("or", "Checks if either value is true."),
|
||||
("xor", "Checks if one value is true and the other is false."),
|
||||
("not", "Negates a value or expression."),
|
||||
(
|
||||
"and",
|
||||
"Both values are true (short-circuits when first value is false)",
|
||||
),
|
||||
(
|
||||
"or",
|
||||
"Either value is true (short-circuits when first value is true)",
|
||||
),
|
||||
("xor", "One value is true and the other is false"),
|
||||
("not", "Negates a value or expression"),
|
||||
("in", "Is a member of (doesn't use regex)"),
|
||||
("not-in", "Is not a member of (doesn't use regex)"),
|
||||
(
|
||||
"++",
|
||||
"Appends two lists, a list and a value, two strings, or two binary values",
|
||||
),
|
||||
],
|
||||
Expr::FullCellPath(path) => match path.head.expr {
|
||||
Expr::List(_) => vec![(
|
||||
|
Loading…
Reference in New Issue
Block a user