improve chpwd handling for builtin dirs command 0.2.14
authorMichael Prokop <mika@grml.org>
Sun, 17 Dec 2006 13:55:35 +0000 (14:55 +0100)
committerMichael Prokop <mika@grml.org>
Sun, 17 Dec 2006 13:55:35 +0000 (14:55 +0100)
debian/changelog
etc/skel/.zshrc
etc/zsh/zshrc

index fa471bc..9f55e17 100644 (file)
@@ -1,3 +1,10 @@
+grml-etc-core (0.2.14) unstable; urgency=low
+
+  * Use builtin for chpwd's dirs command instead of the alias
+    and function workaround, thanks - schula!
+
+ -- Michael Prokop <mika@grml.org>  Sun, 17 Dec 2006 14:55:05 +0100
+
 grml-etc-core (0.2.13) unstable; urgency=low
 
   * /etc/zsh/zshrc + /etc/skel/.zshrc: make sure 'dirs' is not
index bfae710..dbadf3c 100644 (file)
@@ -3,7 +3,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Son Dez 17 13:51:23 CET 2006 [mika]
+# Latest change: Son Dez 17 14:50:06 CET 2006 [mika]
 ################################################################################
 
 # source ~/.zshrc.global {{{
 # jump between directories
 # Copyright 2005 Nikolai Weibull <nikolai@bitwi.se>
 # notice: option AUTO_PUSHD has to be set
-  alias d &>/dev/null || functions d &>/dev/null || d(){
+  d(){
     emulate -L zsh
     autoload -U colors
     local color=$fg_bold[blue]
index baa5890..5466b63 100644 (file)
@@ -379,10 +379,8 @@ fi
      # "cd -" won't work after login by just setting $OLDPWD, so
      cd $dirstack[0] && cd $OLDPWD
   fi
-  # notice: we have to make sure 'dirs' is not a function/alias, otherwise
-  # zsh might hang of course
   chpwd() {
-    alias dirs &>/dev/null || functions dirs &>/dev/null || dirs -pl >! ~/.zdirs
+    builtin dirs -pl >! ~/.zdirs
   }
 # }}}