From: Simon Ruderich Date: Tue, 6 Sep 2011 19:26:21 +0000 (+0200) Subject: zsh/env: Display error message if lesspipe failed. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;ds=sidebyside;h=4957ba9806c371d2a284eb5aea376a4fc87f8240;p=config%2Fdotfiles.git zsh/env: Display error message if lesspipe failed. Some OS (including Gentoo) install /usr/bin/lesspipe but with a different behavior than the Debian version. --- diff --git a/zsh/env b/zsh/env index 6c02f46..373a849 100644 --- a/zsh/env +++ b/zsh/env @@ -28,7 +28,9 @@ export LESS_TERMCAP_se=$'\e[0m' # Setup lesspipe to view multiple file-types (like .gz, .zip, etc.) with less. # Useful in combination with the "p" alias. Taken from Debian's default bash # files. Thanks. -[[ -x /usr/bin/lesspipe ]] && eval "$(SHELL=/bin/sh lesspipe)" +if [[ -x /usr/bin/lesspipe ]]; then + eval "$(SHELL=/bin/sh lesspipe)" || echo "Broken lesspipe!" >&2 +fi source_config ~/.zsh/env.local