Version 0.1.1 behavior is documented here. Thesupport record separates local verification frompublished MoonX behavior; moonx examples use registry releases.
Evaluate integer and string expressions. Pass each operator and operand as aseparate argument; quote operators that the calling shell would interpret.
Supports |, &, comparisons (=, ==, !=, <, <=, >, >=),integer +, -, *, /, %, anchored BRE matching with :, and parentheses.Integer arithmetic is not limited to machine-word size. Logical operatorsshort-circuit evaluation; skipped expressions still require valid syntax.
length, index, substr, and match provide string operations. Prefix +quotes the next argument as a string, including keywords and operators.Matching returns the first captured group when present, otherwise the matchedbyte count. Strings use byte offsets and C-locale ordering. Patternbackreferences, word assertions and locale-aware character operations arenot included. --help, --version, and the leading -- separator are available.
Exit status is 0 for a nonempty, nonzero result, 1 for an empty or zero result,and 2 for invalid expressions or evaluation errors.
Standalone --version prints exactly expr 0.1.1 followed by onenewline. Standalone --help starts with Usage: expr, lists bothmetadata options, and ends with a newline. Both write to stdout, leave stdinunread, and exit with status 0. Exact-version publication and verificationremain recorded separately in the support record.