Skip to main content

COMMAND_ARITY

Static COMMAND_ARITY 

Source
pub static COMMAND_ARITY: &[(&str, u8)]
Expand description

Arity dictionary: maps a command prefix (space-separated, lowercase) to the number of positional (non-flag) words, including the base command word, that form the canonical prefix.

Flags (tokens starting with -) are never counted toward arity — that is the central invariant: auto_allow = ["git status"] must match git status -s, git status --porcelain, etc., but not git push.

Ported from opencode packages/opencode/src/permission/arity.ts (163 LOC).