Shell::AutoComplete::Parser
Constants
The shapes a bare_number: flag accepts, keyed by {sign, keep_sign,
suffix}. Built here once rather than per parse call. Capture group 1 is
the value: keep_sign decides whether the sign travels with it (for a
signed flag, where -20 means minus twenty rather than twenty), and
suffix lets a unit or scale follow the digits (-123M).
Class methods
Returns the pattern for a bare_number: configuration.
When dash_positionals is true, a single-dash token that matches no flag
spec (e.g. -foo, or -x that isn't a short flag) is treated as a
positional rather than raising "unknown flag". This lets add/remove
positionals accept -name tokens alongside +name. Double-dash tokens
(--name) are still parsed strictly as flags so typos and --help keep
working; known flags always take precedence over a dash positional.
Every matched flag occurrence is also recorded, in command-line order, as
{spelling as typed, raw value consumed} — the spelling keeps its dashes
and is not canonicalized, and the value is nil when none was consumed
from argv (switches and forced-value shortcut flags).
A token is resolved in one order, and only that order: an exact spelling,
then a pattern spec's shape, then a positional. So a declared flag is
never shadowed by a bare_number: pattern, and a bare number is never
swallowed by dash_positionals.