From: Michael Prokop Date: Fri, 19 Jan 2007 18:28:57 +0000 (+0100) Subject: zsh configs: fix handling of check for binaries X-Git-Tag: 0.2.18~1 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;h=c5def1541078b09dc0a8749b0ffa032f44007ffd;hp=c1f2dec91f1d93d184832a008ad5e4a93f6eb022;p=grml-etc-core.git zsh configs: fix handling of check for binaries --- diff --git a/debian/changelog b/debian/changelog index 51c1744..a56cb6d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Fri, 19 Jan 2007 19:27:43 +0100 + grml-etc-core (0.2.16) unstable; urgency=low * /etc/zsh/zshrc: diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc index dbadf3c..6146f47 100644 --- a/etc/skel/.zshrc +++ b/etc/skel/.zshrc @@ -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" @@ -776,7 +776,7 @@ } # 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 diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index bf6d7fb..c703c83 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -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.