Simple ZSH plugin that will display an alias when you use a command you have aliased previously. Helpful for remembering aliases you have defined in the past.
Written as a pure ZSH script for speed. Extremely simple (directly looks up command in zsh alias
association array).
akash329d:~$ ls -aF
💡 Alias Tip: la
./ ../ .git/ zsh-alias-finder.plugin.zsh
Variable | Description | Default |
---|---|---|
ZSH_ALIAS_FINDER_PREFIX | Prefix used for aliased command display | 💡 Alias Tip: |
ZSH_ALIAS_FINDER_SUFFIX | Suffix used for aliased command display (is displayed before alias) | %F{green} |
ZSH_ALIAS_FINDER_IGNORED | Comma delimited string of ignored aliases | '' |
Tip is displayed using ZSH prompt expansion, so can use any supported visual effects.
-
Add the following to your
.zshrc
:zinit light akash329d/zsh-alias-finder
-
Start a new terminal session.
-
Add the following to your
.zshrc
:antigen bundle akash329d/zsh-alias-finder
-
Start a new terminal session.
-
Clone this repository into
$ZSH_CUSTOM/plugins
(by default~/.oh-my-zsh/custom/plugins
)git clone https://github.com/akash329d/zsh-alias-finder ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-alias-finder
-
Add the plugin to the list of plugins for Oh My Zsh to load (inside
~/.zshrc
):plugins=( # other plugins... zsh-alias-finder )
-
Start a new terminal session.
-
Clone this repository somewhere on your machine. This guide will assume
~/.zsh/zsh-alias-finder
.git clone https://github.com/akash329d/zsh-alias-finder ~/.zsh/zsh-alias-finder
-
Add the following to your
.zshrc
:source ~/.zsh/zsh-alias-finder/zsh-alias-finder.plugin.zsh
-
Start a new terminal session.