From 9f6e2ce2d1e76a5dae4ba3f9463b61a45638ea41 Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Sat, 14 Mar 2026 09:34:40 +0700 Subject: [PATCH] MISC: Improve help text of expr command (#2561) --- src/Terminal/HelpText.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Terminal/HelpText.ts b/src/Terminal/HelpText.ts index 64239cc27..6d231182c 100644 --- a/src/Terminal/HelpText.ts +++ b/src/Terminal/HelpText.ts @@ -218,15 +218,18 @@ export const HelpTexts: Record = { expr: [ "Usage: expr [mathematical expression]", " ", - "Evaluate a simple mathematical expression. Supports native JavaScript operators:", + "Evaluate a simple mathematical expression. Supports native JavaScript operators:", " ", "+, -, /, *, **, %", " ", "Example:", " ", - " expr 25 * 2 ** 10", + " expr 25*2", + ` expr "25 * 2 ** 10"`, " ", - "Note that letters (non-digits) are not allowed and will be removed from the input.", + `Except for the dot ("."), parentheses ("(" and ")"), and the letters "e" and "E" (used for scientific notation), `, + `most non-digit characters are not allowed and will be removed from the input.`, + "Some edge cases may need to be enclosed in quotes to evaluate correctly.", " ", ], free: [