diff options
author | dana <dana@dana.is> | 2017-10-11 19:00:11 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2017-10-12 06:40:38 -0400 |
commit | 36091591f09bd1a20caa557f92180830753ae0fa (patch) | |
tree | 42764c92481ece1a4d2367059da986c096ba2e0a /README.md | |
parent | 12ffcb4296e0c2068797daea6ed88885b060d916 (diff) |
Add troubleshooting notes re: conflicting tools/aliases
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -487,3 +487,26 @@ was later deprecated in available [here][msys issue explanation]. [msys issue explanation]: https://github.com/BurntSushi/ripgrep/issues/281#issuecomment-269093893 + +#### When I run `rg` it executes some other command! + +It's likely that you have a shell alias or even another tool called `rg` which +is interfering with `ripgrep` — run `which rg` to see what it is. + +(Notably, the `rails` plug-in for +[Oh My Zsh](https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins#rails) sets +up an `rg` alias for `rails generate`.) + +Problems like this can be resolved in one of several ways: + +* If you're using the OMZ `rails` plug-in, disable it by editing the `plugins` + array in your zsh configuration. +* Temporarily bypass an existing `rg` alias by calling `ripgrep` as + `command rg`, `\rg`, or `'rg'`. +* Temporarily bypass an existing alias or another tool named `rg` by calling + `ripgrep` by its full path (e.g., `/usr/bin/rg` or `/usr/local/bin/rg`). +* Permanently disable an existing `rg` alias by adding `unalias rg` to the + bottom of your shell configuration file (e.g., `.bash_profile` or `.zshrc`). +* Give `ripgrep` its own alias that doesn't conflict with other tools/aliases by + adding a line like the following to the bottom of your shell configuration + file: `alias ripgrep='command rg'` |