less.csh: avoid unnecessary stat() call
Resolves: #1321591 Version: 481-3
This commit is contained in:
parent
11bfc57bdf
commit
32b553bce3
14
less.csh
14
less.csh
@ -1,8 +1,14 @@
|
||||
# less initialization script (csh)
|
||||
if ( -x /usr/bin/lesspipe.sh ) then
|
||||
if ( $?LESSOPEN && { eval 'test ! -z "$LESSOPEN"' } ) then
|
||||
:
|
||||
else
|
||||
|
||||
# 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
|
||||
|
3
less.sh
3
less.sh
@ -1,4 +1,7 @@
|
||||
# less initialization script (sh)
|
||||
|
||||
# All less.*sh files should have the same semantics!
|
||||
|
||||
if [ -z "$LESSOPEN" ] && [ -x /usr/bin/lesspipe.sh ]; then
|
||||
export LESSOPEN="|/usr/bin/lesspipe.sh %s"
|
||||
fi
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: A text file browser similar to more, but better
|
||||
Name: less
|
||||
Version: 481
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: GPLv3+ or BSD
|
||||
Group: Applications/Text
|
||||
Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
|
||||
@ -67,6 +67,10 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Tue Mar 29 2016 Pavel Raiskup <praiskup@redhat.com> - 481-3
|
||||
- avoid one ubiquitous stat() call in less.sh and less.csh if possible
|
||||
(rhbz#1321591)
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 481-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user