MISC: Improve help text of expr command (#2561)

This commit is contained in:
catloversg
2026-03-14 09:34:40 +07:00
committed by GitHub
parent 50442472b5
commit 9f6e2ce2d1

View File

@@ -218,15 +218,18 @@ export const HelpTexts: Record<string, string[]> = {
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: [