Skip to main content

Module bash_arity

Module bash_arity 

Source
Expand description

Bash arity dictionary for command-prefix allow rule matching.

BashArityDict 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.

§Invariant

Flags (tokens starting with -) are never counted toward arity. auto_allow = ["git status"] must match git status -s and git status --porcelain, but not git push.

§Coverage

30+ common tools are covered across: git, npm, yarn, pnpm, cargo, docker, kubectl, go, python/pip, gh, rustup, deno, bun, aws, terraform, make, and more.

Structs§

BashArityDict
Arity dictionary for bash command-prefix allow rules.

Statics§

BASH_ARITY_TABLE
Static arity table: (prefix, arity).