Home

Awesome

ZSH Alias Finder

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

Customization

VariableDescriptionDefault
ZSH_ALIAS_FINDER_PREFIXPrefix used for aliased command displayšŸ’” Alias Tip:
ZSH_ALIAS_FINDER_SUFFIXSuffix used for aliased command display (is displayed before alias)%F{green}
ZSH_ALIAS_FINDER_IGNOREDComma delimited string of ignored aliases''

Tip is displayed using ZSH prompt expansion, so can use any supported visual effects.

Installation

Zinit

  1. Add the following to your .zshrc:

    zinit light akash329d/zsh-alias-finder
    
  2. Start a new terminal session.

Antigen

  1. Add the following to your .zshrc:

    antigen bundle akash329d/zsh-alias-finder
    
  2. Start a new terminal session.

Oh My Zsh

  1. 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
    
  2. Add the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):

    plugins=(
        # other plugins...
        zsh-alias-finder
    )
    
  3. Start a new terminal session.

Manual (Git Clone)

  1. 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
    
  2. Add the following to your .zshrc:

    source ~/.zsh/zsh-alias-finder/zsh-alias-finder.plugin.zsh
    
  3. Start a new terminal session.