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:
set -ex - The most useful bash trick of the year August 31, 2014 Linux
brotli_static in Nginx November 8, 2024 Linux
Be very careful with your add_header in Nginx! You might make your site insecure February 11, 2018 Linux
Linux tip: du --max-depth=1 September 27, 2007 Linux
Related by keyword:
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
How to intercept and react to non-zero exits in bash February 23, 2023 Bash, GitHub
The correct way to index data into Elasticsearch with (Python) elasticsearch-dsl May 14, 2021 Python, MDN, Elasticsearch