mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 00:13:21 +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 {
|
let possible_operations = match op {
|
||||||
Expr::Int(_) => vec![
|
Expr::Int(_) => vec![
|
||||||
("+", "Plus / Addition"),
|
("+", "Add (Plus)"),
|
||||||
("-", "Minus / Subtraction"),
|
("-", "Subtract (Minus)"),
|
||||||
("*", "Multiply"),
|
("*", "Multiply"),
|
||||||
("/", "Divide"),
|
("/", "Divide"),
|
||||||
("==", "Equal"),
|
("==", "Equal to"),
|
||||||
("!=", "Not Equal"),
|
("!=", "Not equal to"),
|
||||||
("//", "Floor Division"),
|
("//", "Floor division"),
|
||||||
("<", "Less Than"),
|
("<", "Less than"),
|
||||||
(">", "Greater Than"),
|
(">", "Greater than"),
|
||||||
("<=", "Less Than or Equal to"),
|
("<=", "Less than or equal to"),
|
||||||
(">=", "Greater Than or Equal to"),
|
(">=", "Greater than or equal to"),
|
||||||
("mod", "Modulo"),
|
("mod", "Floor division remainder (Modulo)"),
|
||||||
("**", "Pow"),
|
("**", "Power of"),
|
||||||
("bit-or", "bitwise or"),
|
("bit-or", "Bitwise OR"),
|
||||||
("bit-xor", "bitwise exclusive or"),
|
("bit-xor", "Bitwise exclusive OR"),
|
||||||
("bit-and", "bitwise and"),
|
("bit-and", "Bitwise AND"),
|
||||||
("bit-shl", "bitwise shift left"),
|
("bit-shl", "Bitwise shift left"),
|
||||||
("bit-shr", "bitwise shift right"),
|
("bit-shr", "Bitwise shift right"),
|
||||||
],
|
("in", "Is a member of (doesn't use regex)"),
|
||||||
Expr::String(_) => vec![
|
("not-in", "Is not a member of (doesn't use regex)"),
|
||||||
("=~", "Regex Match / Contains"),
|
|
||||||
("!~", "Not Regex Match / Not Contains"),
|
|
||||||
("in", "In / Contains (doesn't use regex)"),
|
|
||||||
(
|
(
|
||||||
"++",
|
"++",
|
||||||
"Appends two lists, a list and a value, two strings, or two binary values",
|
"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"),
|
Expr::String(_) => vec![
|
||||||
("ends-with", "Ends With"),
|
("=~", "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![
|
Expr::Float(_) => vec![
|
||||||
("+", "Plus / Addition"),
|
("+", "Add (Plus)"),
|
||||||
("-", "Minus / Subtraction"),
|
("-", "Subtract (Minus)"),
|
||||||
("*", "Multiply"),
|
("*", "Multiply"),
|
||||||
("/", "Divide"),
|
("/", "Divide"),
|
||||||
("==", "Equal"),
|
("==", "Equal to"),
|
||||||
("!=", "Not Equal"),
|
("!=", "Not equal to"),
|
||||||
("//", "Floor Division"),
|
("//", "Floor division"),
|
||||||
("<", "Less Than"),
|
("<", "Less than"),
|
||||||
(">", "Greater Than"),
|
(">", "Greater than"),
|
||||||
("<=", "Less Than or Equal to"),
|
("<=", "Less than or equal to"),
|
||||||
(">=", "Greater Than or Equal to"),
|
(">=", "Greater than or equal to"),
|
||||||
("mod", "Modulo"),
|
("mod", "Floor division remainder (Modulo)"),
|
||||||
("**", "Pow"),
|
("**", "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![
|
Expr::Bool(_) => vec![
|
||||||
("and", "Checks if both values are true."),
|
(
|
||||||
("or", "Checks if either value is true."),
|
"and",
|
||||||
("xor", "Checks if one value is true and the other is false."),
|
"Both values are true (short-circuits when first value is false)",
|
||||||
("not", "Negates a value or expression."),
|
),
|
||||||
|
(
|
||||||
|
"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::FullCellPath(path) => match path.head.expr {
|
||||||
Expr::List(_) => vec![(
|
Expr::List(_) => vec![(
|
||||||
|
Loading…
Reference in New Issue
Block a user