[Troubleshooting] 实用 Zsh 自定义函数
Show table of contentsHide table of contents
cd 后自动 ls
cd() {
builtin cd "$@" && ls
}
brew up 更新、清理 Homebrew
brew() {
if [ "$1" = "up" ]; then
command brew update &&
command brew upgrade --greedy &&
command brew cleanup --prune=all
else
command brew "$@"
fi
}