summaryrefslogtreecommitdiff
path: root/zless.in
diff options
context:
space:
mode:
Diffstat (limited to 'zless.in')
-rw-r--r--zless.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/zless.in b/zless.in
index 7d4d3e4..52767a2 100644
--- a/zless.in
+++ b/zless.in
@@ -64,8 +64,17 @@ less' '[1-9][0-9][0-9][0-9]*)
use_input_pipe_on_stdin='-';;
*) use_input_pipe_on_stdin='';;
esac
+case $less_version in
+less' '623* | \
+less' '62[4-9]* | \
+less' '6[3-9][0-9]* | \
+less' '[7-9][0-9][0-9]* | \
+less' '[1-9][0-9][0-9][0-9]*)
+ show_preproc_error='--show-preproc-error';;
+*) show_preproc_error='';;
+esac
LESSOPEN="|$check_exit_status${use_input_pipe_on_stdin}'gzip' -cdfq -- %s"
export LESSOPEN
-exec less "$@"
+exec less $show_preproc_error "$@"