From 73d7a9a13106115c65b57734e1fca59b23152c3f Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sun, 17 Dec 2006 14:55:35 +0100 Subject: [PATCH] improve chpwd handling for builtin dirs command --- debian/changelog | 7 +++++++ etc/skel/.zshrc | 4 ++-- etc/zsh/zshrc | 4 +--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index fa471bc..9f55e17 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc index bfae710..dbadf3c 100644 --- a/etc/skel/.zshrc +++ b/etc/skel/.zshrc @@ -3,7 +3,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # 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 {{{ @@ -265,7 +265,7 @@ # jump between directories # Copyright 2005 Nikolai Weibull # 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] diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index baa5890..5466b63 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -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 } # }}} -- 2.1.4