Local alias for zsh
git clone https://github.com/Sk7tch/localias.git
ln -s `pwd`/localias $ZSH/plugins/.
And edit your .zshrc plugins line:
plugins=(localias)
Start a new shell or source .zshrc and enjoy :)
Create .localias file:
toto=ls
When entering the folder where .localias file exist, an alias toto for ls is creating. When leaving, the alias is removed.
$> cat test/.localias
toto=ls
$> toto
zsh: command not found: toto
$> cd test
$> toto
file_1 file_2 file_3
$> cd ..
$> toto
zsh: command not found: toto
Options can be modified in your local alias file.
# recursive true
When active .localias are loaded through each folder of the path. Default to true.
# override true
When active aliases defined in .localias can override existing aliases. Default to true.