Clean up git prompt exclude hook
This commit is contained in:
parent
1f110837c6
commit
dfd1eb7933
6
init.zsh
6
init.zsh
@ -158,15 +158,15 @@ function __zsh_vim_key_prompt_handler {
|
|||||||
printf '\e[%d q' "${_shape}"
|
printf '\e[%d q' "${_shape}"
|
||||||
}
|
}
|
||||||
function __zsh_check_disabled_git_prompt_dirs {
|
function __zsh_check_disabled_git_prompt_dirs {
|
||||||
local excluded=false
|
local reset_prompt=true
|
||||||
for file in ${(s:\0:)__ZSH_PROMPT_EXCLUDE_GIT_STATUS}; do
|
for file in ${(s:\0:)__ZSH_PROMPT_EXCLUDE_GIT_STATUS}; do
|
||||||
if [[ "${PWD:P}/" = "${file}/"* ]]; then
|
if [[ "${PWD:P}/" = "${file}/"* ]]; then
|
||||||
SPACESHIP_GIT_STATUS_SHOW=false
|
SPACESHIP_GIT_STATUS_SHOW=false
|
||||||
excluded=true
|
reset_prompt=false
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if ! $excluded; then
|
if "${reset_prompt}"; then
|
||||||
SPACESHIP_GIT_STATUS_SHOW=true
|
SPACESHIP_GIT_STATUS_SHOW=true
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user