zshrc: Get rid off whence
authorFrank Terbeck <ft@bewatermyfriend.org>
Sun, 7 Jun 2009 11:11:45 +0000 (13:11 +0200)
committerFrank Terbeck <ft@bewatermyfriend.org>
Sun, 7 Jun 2009 11:11:45 +0000 (13:11 +0200)
debian/changelog
etc/zsh/zshrc

index 47e3b9a..e1cc4cb 100644 (file)
@@ -6,12 +6,13 @@ grml-etc-core (0.3.73) UNRELEASED; urgency=low
   * zshrc: Fix problems related to TERM=mostlike in zshrc. Again reported by
     Rasmus Steinke.
   * zshrc: Give check_com a -g option to test for global aliases, too.
+  * zshrc: Get rid of whence, once and for all.
 
   [ Michael Prokop ]
   * zshrc: add deborphan, pal and hnb to compdef _gnu_generic. Thanks for
     the suggestion to Carsten Hey.
 
- -- Frank Terbeck <ft@grml.org>  Sun, 07 Jun 2009 12:55:15 +0200
+ -- Frank Terbeck <ft@grml.org>  Sun, 07 Jun 2009 13:10:49 +0200
 
 grml-etc-core (0.3.72) unstable; urgency=low
 
index 06523f6..43dab29 100644 (file)
@@ -2233,8 +2233,7 @@ alias term2iso="echo 'Setting terminal to iso mode' ; print -n '\e%@'"
 alias term2utf="echo 'Setting terminal to utf-8 mode'; print -n '\e%G'"
 
 # make sure it is not assigned yet
-[[ $(whence -w utf2iso &>/dev/null) == 'utf2iso: alias' ]] && unalias utf2iso
-
+[[ -n ${aliases[utf2iso]} ]] && unalias utf2iso
 utf2iso() {
     if isutfenv ; then
         for ENV in $(env | command grep -i '.utf') ; do
@@ -2244,7 +2243,7 @@ utf2iso() {
 }
 
 # make sure it is not assigned yet
-[[ $(whence -w iso2utf &>/dev/null) == 'iso2utf: alias' ]] && unalias iso2utf
+[[ -n ${aliases[iso2utf]} ]] && unalias iso2utf
 iso2utf() {
     if ! isutfenv ; then
         for ENV in $(env | command grep -i '\.iso') ; do