Files
rtk-ai__rtk/hooks
Michael Coen 7401f1099f feat(hook): handle global options before subcommands (#99)
* fix(hook): use POSIX character classes for cross-platform grep compatibility

Replace \s with [[:space:]] in all grep -E patterns. The \s shorthand
is a PCRE extension not guaranteed by POSIX ERE, causing intermittent
match failures on macOS depending on grep version and locale settings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(hook): handle global options before subcommands in git/cargo/docker/kubectl

Normalize commands by stripping global options (git -C, --no-pager;
cargo +toolchain; docker -H, --context; kubectl --context, -n) to
correctly identify the subcommand for rewrite matching. Preserves all
original arguments in the rewritten command.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 08:15:02 +01:00
..