less/less.csh
Pavel Raiskup 32b553bce3 less.csh: avoid unnecessary stat() call
Resolves: #1321591
Version: 481-3
2016-03-29 15:38:13 +02:00

15 lines
441 B
Tcsh

# less initialization script (csh)
# All less.*sh files should have the same semantics!
# In case you are curious, the test for non-emptiness is not as easy as in
# Bourne shell. This "eval" construct is probably inspired by Stack
# Overflow question 13343392.
if ( $?LESSOPEN && { eval 'test ! -z "$LESSOPEN"' } ) then
:
else
if ( -x /usr/bin/lesspipe.sh ) then
setenv LESSOPEN "|/usr/bin/lesspipe.sh %s"
endif
endif