aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-10-09 17:24:23 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-10-09 17:24:23 +0300
commite02d3f1156c047102f455f6b0086ccbb3879ec79 (patch)
tree2749bc562e7d7724506a32e15235838f7cbf8131
parentcf8d2414651da5df2cce00b37d6fcb5c584f427f (diff)
don't persist Git state
-rwxr-xr-xinternal/p10k.zsh12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 1c2b6104..60f06673 100755
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -2470,7 +2470,7 @@ _p9k_vcs_info_init() {
function _p9k_vcs_status_save() {
local z=$'\0'
- _p9k_last_git_prompt[$VCS_STATUS_WORKDIR]=$VCS_STATUS_ACTION$z$VCS_STATUS_COMMIT\
+ _p9k_gitstatus_last[$VCS_STATUS_WORKDIR]=$VCS_STATUS_ACTION$z$VCS_STATUS_COMMIT\
$z$VCS_STATUS_COMMITS_AHEAD$z$VCS_STATUS_COMMITS_BEHIND$z$VCS_STATUS_HAS_CONFLICTED\
$z$VCS_STATUS_HAS_STAGED$z$VCS_STATUS_HAS_UNSTAGED$z$VCS_STATUS_HAS_UNTRACKED\
$z$VCS_STATUS_INDEX_SIZE$z$VCS_STATUS_LOCAL_BRANCH$z$VCS_STATUS_NUM_CONFLICTED\
@@ -2493,7 +2493,7 @@ function _p9k_vcs_status_restore() {
function _p9k_vcs_status_for_dir() {
local dir=$1
while true; do
- _p9k_ret=$_p9k_last_git_prompt[$dir]
+ _p9k_ret=$_p9k_gitstatus_last[$dir]
[[ -n $_p9k_ret ]] && return 0
[[ $dir == / ]] && return 1
dir=${dir:h}
@@ -2504,7 +2504,7 @@ function _p9k_vcs_status_purge() {
local dir=$1
while true; do
# unset doesn't work if $dir contains weird shit
- _p9k_last_git_prompt[$dir]=""
+ _p9k_gitstatus_last[$dir]=""
_p9k_git_slow[$dir]=""
[[ $dir == / ]] && break
dir=${dir:h}
@@ -3729,10 +3729,10 @@ _p9k_init_vars() {
typeset -ga _p9k_right_join
typeset -g _p9k_public_ip
typeset -g _p9k_todo_file
- # git workdir => the last prompt we've shown for it
- typeset -gA _p9k_last_git_prompt
# git workdir => 1 if gitstatus is slow on it, 0 if it's fast.
typeset -gA _p9k_git_slow
+ # git workdir => the last state we've seen for it
+ typeset -gA _p9k_gitstatus_last
typeset -gi _p9k_gitstatus_disabled
typeset -gF _p9k_gitstatus_start_time
typeset -g _p9k_prompt
@@ -4400,7 +4400,7 @@ _p9k_must_init() {
'${ZSH_VERSION}' '${ZSH_PATCHLEVEL}' '${(%):-%n}' '${GITSTATUS_LOG_LEVEL}'
'${GITSTATUS_ENABLE_LOGGING}' '${GITSTATUS_DAEMON}' '${GITSTATUS_NUM_THREADS}'
'${DEFAULT_USER}' '${ZLE_RPROMPT_INDENT}' '${P9K_SSH}' '${__p9k_ksh_arrays}'
- '${__p9k_sh_glob}' '${parameters[transient_rprompt]}' 'v4')
+ '${__p9k_sh_glob}' '${parameters[transient_rprompt]}' 'v5')
IFS=$'\2' param_sig="${(e)param_sig}"
[[ $param_sig == $_p9k_param_sig ]] && return 1
[[ -n $_p9k_param_sig ]] && _p9k_deinit