From 4957ba9806c371d2a284eb5aea376a4fc87f8240 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Tue, 6 Sep 2011 21:26:21 +0200 Subject: [PATCH] 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. --- zsh/env | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.45.2