在 oh-my-zsh 進入 包含 git 倉庫目錄時,會變的比平時慢/卡頓。
因為 oh-my-zsh 要獲取 git 更新信息,設置 oh-my-zsh 不讀取文件變化信息就可以了。
進入當前目錄(指定--local,表示只針對當前git 倉庫目錄)
git config --local --add oh-my-zsh.hide-dirty 1
查看
git config --local -e
參考:https://blog.csdn.net/a_ran/article/details/72847022
源碼參考:https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/git.zsh