From c4db3a6a2b3a543dc59a28349c1b0fc565bee25b Mon Sep 17 00:00:00 2001 From: Ruthenic Date: Sat, 11 Jun 2022 03:45:04 -0400 Subject: [PATCH] able to disable git status in prompt --- .zshrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.zshrc b/.zshrc index 6a79466..e04fe2d 100644 --- a/.zshrc +++ b/.zshrc @@ -54,6 +54,9 @@ autoload -Uz add-zsh-hook _git_full= function _git_info() { + if [[ -v DISABLE_GIT ]]; then + return + fi local modified=0; local new=0; _git_full= @@ -89,6 +92,8 @@ function _git_info() { _git_full+=$'%{\e[0m%}' fi } +alias disable_git_status="DISABLE_GIT=1" +alias enable_git_status="unset DISABLE_GIT" add-zsh-hook precmd _git_info