重定义cd即刻
cd (){ test -r .exit.sh && . .exit.sh
builtin cd "$1"
test -r .enter.sh &&. .enter.sh
}
本文介绍了一种重定义cd命令的方法,通过使用shell脚本实现更复杂的目录切换功能,包括进入和退出目录时运行特定脚本。
重定义cd即刻
cd (){ test -r .exit.sh && . .exit.sh
builtin cd "$1"
test -r .enter.sh &&. .enter.sh
}
1617

被折叠的 条评论
为什么被折叠?