zshrc: prevent chdir() from putting dupes into ~/.zdirs
authorFrank Terbeck <ft@grml.org>
Sun, 20 Jan 2008 00:31:15 +0000 (01:31 +0100)
committerFrank Terbeck <ft@grml.org>
Sun, 20 Jan 2008 00:31:15 +0000 (01:31 +0100)
dirs -pl did print the complete stack, including dupes.
Using ${dirstack} from the zsh/pararmeter module to fix this.

debian/changelog
etc/zsh/zshrc

index 2fdf348..23fb692 100644 (file)
@@ -1,3 +1,9 @@
+grml-etc-core (0.3.47) unstable; urgency=low
+
+  * zshrc: prevent chdir() from putting dupes into ~/.zdirs
+
+ -- Frank Terbeck <ft@grml.org>  Sun, 20 Jan 2008 01:30:00 +0100
+
 grml-etc-core (0.3.46) unstable; urgency=low
 
   [ Frank Terbeck ]
index aea6d38..2503d0e 100644 (file)
@@ -871,7 +871,7 @@ if [[ -f ~/.zdirs ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then
 fi
 
 chpwd() {
-    builtin dirs -pl >! ~/.zdirs
+    builtin print ${(u)dirstack} >! ~/.zdirs
 }
 
 # }}}