Hello all.
Just run into the following issue with zmore/zless:
if you have PAGER envvar set, it's no matter whatever
you'll call, zmore or zless - it'll always run $PAGER.
The problem is that I have PAGER=/usr/bin/more but
sometimes I want to use less. If I run "less foo",
I get what I requested; if I run "zless foo", I got
what zless thinks it knows better of.
Sure, I can add alias for zmore/zless but is there
any point in using PAGER in those scripts at all?
Why not to just call "less" for "zless" and "more"
in other cases?
--
WBR,
Vadim Zhukov
Index: zmore
===================================================================
RCS file: /cvs/src/usr.bin/compress/zmore,v
retrieving revision 1.6
diff -u -p -r1.6 zmore
--- zmore 20 Aug 2008 09:22:02 -0000 1.6
+++ zmore 3 May 2014 13:43:16 -0000
@@ -40,9 +40,9 @@ while test $# -ne 0; do
done
if [ `basename $0` == "zless" ] ; then
- pager=${PAGER-less}
+ pager=less
else
- pager=${PAGER-more}
+ pager=more
fi
# No files means read from stdin
Index: zmore.1
===================================================================
RCS file: /cvs/src/usr.bin/compress/zmore.1,v
retrieving revision 1.10
diff -u -p -r1.10 zmore.1
--- zmore.1 16 Aug 2009 09:41:08 -0000 1.10
+++ zmore.1 3 May 2014 13:43:16 -0000
@@ -90,18 +90,6 @@ In this mode
will assume
.Xr gzip 1
style compression since there is no suffix on which to make a decision.
-.Sh ENVIRONMENT
-.Bl -tag -width "PAGER"
-.It Ev PAGER
-Program used to display files.
-If unset,
-.Pa /usr/bin/more
-is used
-.Pq Nm zmore
-or
-.Pa /usr/bin/less
-.Pq Nm zless .
-.El
.Sh SEE ALSO
.Xr compress 1 ,
.Xr gzip 1 ,