Commit 462eba1
fix(zsh): stop aliasing grep to rg in interactive shells
`alias grep='rg'` made standard grep invocations silently change meaning: rg is
not a drop-in grep replacement. The most common breakage is flags — `grep -E`
means extended regex, but rg's `-E` is --encoding, so a copied command like
`grep -E '^ClientAlive(Interval|CountMax)' /etc/ssh/sshd_config` fails with
"unknown encoding". This breaks pasted support/debugging commands and coding
agents (e.g. Codex) that emit POSIX/GNU grep when they intend grep semantics and
already call `rg` explicitly when they want ripgrep.
This matches the existing principle in the same file for fd ("NOT aliased over
'find' — fd has incompatible syntax"). Replaced the shadowing alias with
non-shadowing convenience aliases `rgrep`/`search` for ripgrep.
Closes #303
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 2285968 commit 462eba1
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
137 | 143 | | |
138 | 144 | | |
139 | 145 | | |
| |||
0 commit comments