From 79d67c1baf7090ec5957e1a6eef7dc009ace0d73 Mon Sep 17 00:00:00 2001 From: hophacker Date: Sun, 9 Feb 2020 22:19:15 +0800 Subject: [PATCH] =?UTF-8?q?git-info=E5=AF=BC=E8=87=B4=E5=A4=A7=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=A4=84=E7=90=86prompt=E6=97=B6=E4=BC=9A=E8=8A=B1?= =?UTF-8?q?=E5=B7=A8=E9=95=BF=E6=97=B6=E9=97=B4=EF=BC=8C=E6=95=85=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=B8=A4=E4=B8=AAdisable/enable=5Fgit=5Finfo=E4=B8=80?= =?UTF-8?q?=E9=94=AE=E5=88=87=E6=8D=A2=E6=98=AF=E5=90=A6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?git-info?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zsh/prezto-themes/prompt_skwp_setup | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zsh/prezto-themes/prompt_skwp_setup b/zsh/prezto-themes/prompt_skwp_setup index 3afcea7..1635915 100644 --- a/zsh/prezto-themes/prompt_skwp_setup +++ b/zsh/prezto-themes/prompt_skwp_setup @@ -17,7 +17,9 @@ function prompt_skwp_precmd { unsetopt XTRACE KSH_ARRAYS # Get Git repository information. - if (( $+functions[git-info] )); then + if [[ $DISABLE_GIT_INFO == 1 ]]; then + git-info off + elif [[ $+functions[git-info] ]]; then git-info on git-info fi @@ -72,4 +74,6 @@ function prompt_skwp_setup { RPROMPT='%F{blue}${ruby_info[version]}' } +alias disable_git_info='DISABLE_GIT_INFO=1' +alias enable_git_info='DISABLE_GIT_INFO=0' prompt_skwp_setup "$@"