block_command()

Register a declarative hook that blocks a Bash command matching a pattern.

Usage

Source

block_command(
    pattern,
    *,
    reason,
    hint=None,
    tests=None,
)

Example

block_command([“git”, “stash”], reason=“git stash is not allowed”, hint=“Use jj”)