A plugin for zsh to Auto Run any script when you enter a directory.
More flexible, more convenient, simpler, and more free.
- open your terminal
- create
~/.autorc
file - copy
.autorc
content to your.autorc
file and save it - download
auto-run.plugin.zsh
file to your local folder (maybe~/.zsh/auto-run.plugin.zsh
) - edit your
~/.zshrc
file and add following code into it[ -f $HOME/.zsh/auto-run.plugin.zsh ] && source $HOME/.zsh/auto-run.plugin.zsh
- save
~/.zshrc
and exit editor and runsource ~/.zshrc
- create
$PWD/.auto
file and write some script then it will be executed when you enter the$PWD
folder
~/.autorc
是进入任何文件夹都会默认首先执行的脚本也可以创建
$PWD/.auto
文件,当进入$PWD
时,若存在.auto
文件,则会执行的对应的脚本