git-info导致大项目处理prompt时会花巨长时间,故增加两个disable/enable_git_info一键切换是否显示git-info
This commit is contained in:
parent
f751d75940
commit
79d67c1baf
@ -17,7 +17,9 @@ function prompt_skwp_precmd {
|
|||||||
unsetopt XTRACE KSH_ARRAYS
|
unsetopt XTRACE KSH_ARRAYS
|
||||||
|
|
||||||
# Get Git repository information.
|
# 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 on
|
||||||
git-info
|
git-info
|
||||||
fi
|
fi
|
||||||
@ -72,4 +74,6 @@ function prompt_skwp_setup {
|
|||||||
RPROMPT='%F{blue}${ruby_info[version]}'
|
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 "$@"
|
prompt_skwp_setup "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user