mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
Additional chpwd clobbering fix for dirpersist
This commit is contained in:
parent
084792b829
commit
aac5523629
1 changed files with 3 additions and 1 deletions
|
@ -11,7 +11,9 @@ if [[ -f ${dirstack_file} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then
|
||||||
[[ -d $dirstack[1] ]] && cd $dirstack[1] && cd $OLDPWD
|
[[ -d $dirstack[1] ]] && cd $dirstack[1] && cd $OLDPWD
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chpwd() {
|
typeset -ga chpwd_functions
|
||||||
|
chpwd_functions+='chpwd_dirpersist'
|
||||||
|
chpwd_dirpersist() {
|
||||||
if (( $DIRSTACKSIZE <= 0 )) || [[ -z $dirstack_file ]]; then return; fi
|
if (( $DIRSTACKSIZE <= 0 )) || [[ -z $dirstack_file ]]; then return; fi
|
||||||
local -ax my_stack
|
local -ax my_stack
|
||||||
my_stack=( ${PWD} ${dirstack} )
|
my_stack=( ${PWD} ${dirstack} )
|
||||||
|
|
Loading…
Reference in a new issue