zsh configs: fix handling of check for binaries
authorMichael Prokop <mika@grml.org>
Fri, 19 Jan 2007 18:28:57 +0000 (19:28 +0100)
committerMichael Prokop <mika@grml.org>
Fri, 19 Jan 2007 18:28:57 +0000 (19:28 +0100)
debian/changelog
etc/skel/.zshrc
etc/zsh/zshrc

index 51c1744..a56cb6d 100644 (file)
@@ -1,3 +1,11 @@
+grml-etc-core (0.2.17) unstable; urgency=low
+
+  * zsh config files: fix handling of check for binaries, thanks
+    for reporting to Erich Minderlein, thanks for investigation
+    and patch to ft! (Closes: issue80)
+
+ -- Michael Prokop <mika@grml.org>  Fri, 19 Jan 2007 19:27:43 +0100
+
 grml-etc-core (0.2.16) unstable; urgency=low
 
   * /etc/zsh/zshrc:
index dbadf3c..6146f47 100644 (file)
@@ -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"
   }
 
 # 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
index bf6d7fb..c703c83 100644 (file)
@@ -393,7 +393,7 @@ fi
 
 # {{{ display battery status on right side of prompt via running 'BATTERY=1 zsh'
   if [ -n "$BATTERY" ] ; then
-     if [ -x =acpi ] ; then
+     if [ -x $(which acpi) ] ; then
         PERCENT="${(C)${(s| |)$(acpi 2>/dev/null)}[4]}"
         [ -z "$PERCENT" ] && PERCENT='acpi not present'
         if [ "${PERCENT%%%}" -lt 20 ] ; then
@@ -664,8 +664,8 @@ Enjoy your grml system with the zsh!$reset_color"
   fi
 
 # if cdrecord is a symlink (to wodim) or isn't present at all warn:
-  if [ -L /usr/bin/cdrecord -o ! -x =cdrecord ] ; then
-     if [ -x =wodim ] ; then
+  if [ -L /usr/bin/cdrecord -o ! -x $(which cdrecord) ] ; then
+     if [ -x $(which wodim) ] ; then
         alias cdrecord="echo 'cdrecord is not provided under its original name by Debian anymore.
 See #377109 in the BTS of Debian for more details.