zsh configs: fix handling of check for binaries
[grml-etc-core.git] / etc / skel / .zshrc
index bfae710..6146f47 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 {{{
@@ -35,9 +35,9 @@
 # set default browser
   if [ -z "$BROWSER" ] ; then
      if [ -n "$DISPLAY" ] ; then
-        [ -x =firefox ] && export BROWSER=firefox
+        [ -x $(which firefox) ] && export BROWSER=firefox
      else
-        [ -x =w3m ] && export BROWSER=w3m
+        [ -x $(which w3m) ] && export BROWSER=w3m
      fi
   fi
   (( ${+PAGER} ))   || export PAGER="less"
 # 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]
   }
 
 # highlight important stuff in diff output, usage example: hg diff | hidiff
-  [ -x =histring ] && \
+  [ -x $(which histring) ] && \
   alias hidiff="histring -fE '^Comparing files .*|^diff .*' | histring -c yellow -fE '^\-.*' | histring -c green -fE '^\+.*'"
 
 # rename pictures based on information found in exif headers