From: Frank Terbeck Date: Sat, 7 Jul 2007 08:53:18 +0000 (+0200) Subject: setting pushd_ignore_dups. X-Git-Tag: 0.3.15~2 X-Git-Url: https://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=5c8582fa1ca7b07348b683ca65543f8df12bfcff setting pushd_ignore_dups. --- diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 33b60ea..a1c1d31 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -567,6 +567,7 @@ fi setopt auto_pushd # make cd push the old directory onto the directory stack. setopt nonomatch # try to avoid the 'zsh: no matches found...' setopt nobeep # avoid "beep"ing + setopt pushd_ignore_dups # don't push the same dir twice. MAILCHECK=30 # mailchecks REPORTTIME=5 # report about cpu-/system-/user-time of command if running longer than 5 seconds @@ -601,7 +602,7 @@ fi # dirstack handling {{{ DIRSTACKSIZE=20 if [[ -f ~/.zdirs ]] && [[ ${#dirstack[*]} -eq 0 ]]; then - dirstack=( ${(uf)"$(< ~/.zdirs)"} ) + dirstack=( ${(f)"$(< ~/.zdirs)"} ) # "cd -" won't work after login by just setting $OLDPWD, so [[ -d $dirstack[0] ]] && cd $dirstack[0] && cd $OLDPWD fi