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
~/.autorcfile - copy
.autorccontent to your.autorcfile and save it - download
auto-run.plugin.zshfile to your local folder (maybe~/.zsh/auto-run.plugin.zsh) - edit your
~/.zshrcfile and add following code into it[ -f $HOME/.zsh/auto-run.plugin.zsh ] && source $HOME/.zsh/auto-run.plugin.zsh
- save
~/.zshrcand exit editor and runsource ~/.zshrc - create
$PWD/.autofile and write some script then it will be executed when you enter the$PWDfolder
~/.autorc是进入任何文件夹都会默认首先执行的脚本也可以创建
$PWD/.auto文件,当进入$PWD时,若存在.auto文件,则会执行的对应的脚本