I wanted to install a command line tool called gg. But for some reason, gg was already tied to an alias. No problem, I'll just delete that alias. I looked in ~/.bash_profile and I looked in ~/.zshrc and it wasn't there!

But here's how I managed to figure out where it came from:

which gg
gg: aliased to git gui citool

Then I copied the git gui citool part of that output and ran:


▶ rg --hidden 'git gui citool'
.oh-my-zsh/plugins/git/git.plugin.zsh
104:alias gg='git gui citool'
105:alias gga='git gui citool --amend'

A ha! So it was .oh-my-zsh/plugins/git/git.plugin.zsh that was the culprit. Totally forgot about the plugin. It's full of other useful aliases so I just commented out the one(s) I knew I don't need any more.

By the way rg, aka. ripgrep is probably one of the best tools I have. I use it so often that it's attached to my belt rather than in my toolbox.

Comments

Your email will never ever be published.

Previous:
Real minimal example of going from setState to MobX May 4, 2018 React, JavaScript
Next:
Always return namespaces in Django REST Framework May 11, 2018 Python, Django
Related by category:
Find the source of an alias in bash September 29, 2025 Linux
How to count the number of non-blank lines with Bash September 3, 2025 Linux
gg shell completion August 13, 2025 Linux
set -ex - The most useful bash trick of the year August 31, 2014 Linux
Related by keyword:
Find the source of an alias in bash September 29, 2025 Linux, Bash, macOS
gg shell completion August 13, 2025 Linux, JavaScript, Bun, macOS
set -ex - The most useful bash trick of the year August 31, 2014 Linux
Search hidden directories with ripgrep, by default December 30, 2023 Linux, macOS