mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
don't add duplicates to history
This commit is contained in:
parent
d2725d44fc
commit
85decc5ffa
1 changed files with 1 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ DIRSTACKSIZE=${DIRSTACKSIZE:-20}
|
||||||
dirstack_file=${dirstack_file:-${HOME}/.zdirs}
|
dirstack_file=${dirstack_file:-${HOME}/.zdirs}
|
||||||
|
|
||||||
if [[ -f ${dirstack_file} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then
|
if [[ -f ${dirstack_file} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then
|
||||||
dirstack=( ${(f)"$(< $dirstack_file)"} )
|
dirstack=( ${(uf)"$(< $dirstack_file)"} )
|
||||||
# "cd -" won't work after login by just setting $OLDPWD, so
|
# "cd -" won't work after login by just setting $OLDPWD, so
|
||||||
[[ -d $dirstack[1] ]] && cd $dirstack[1] && cd $OLDPWD
|
[[ -d $dirstack[1] ]] && cd $dirstack[1] && cd $OLDPWD
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue