setting pushd_ignore_dups.
authorFrank Terbeck <ft@grml.org>
Sat, 7 Jul 2007 08:53:18 +0000 (10:53 +0200)
committerFrank Terbeck <ft@grml.org>
Sat, 7 Jul 2007 08:53:18 +0000 (10:53 +0200)
etc/zsh/zshrc

index 33b60ea..a1c1d31 100644 (file)
@@ -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