2010-01-29 15:00:15 +01:00
|
|
|
Index: zmore.in
|
|
|
|
===================================================================
|
|
|
|
--- zmore.in.orig
|
2006-12-15 18:09:13 +01:00
|
|
|
+++ zmore.in
|
2010-01-29 15:00:15 +01:00
|
|
|
@@ -55,11 +55,33 @@ else
|
2006-12-15 18:09:13 +01:00
|
|
|
trap 'stty $ncb echo 2>/dev/null; exit' 0 2 3 5 10 13 15
|
|
|
|
fi
|
|
|
|
|
|
|
|
+opt=
|
|
|
|
+pager ()
|
|
|
|
+{
|
|
|
|
+ eval ${PAGER-more} \$opt
|
|
|
|
+ cat > /dev/null
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+while :; do
|
|
|
|
+ case $1 in
|
|
|
|
+ --)
|
|
|
|
+ shift
|
|
|
|
+ break
|
|
|
|
+ ;;
|
|
|
|
+ [-+]*)
|
|
|
|
+ opt="$opt $1"
|
|
|
|
+ shift
|
|
|
|
+ ;;
|
|
|
|
+ *)
|
|
|
|
+ break
|
|
|
|
+ ;;
|
|
|
|
+ esac
|
|
|
|
+done
|
|
|
|
if test $# = 0; then
|
|
|
|
if test -t 0; then
|
|
|
|
echo "$usage"
|
|
|
|
else
|
|
|
|
- gzip -cdfq | eval ${PAGER-more}
|
|
|
|
+ gzip -cdfq | pager
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
FIRST=1
|
2010-01-29 15:00:15 +01:00
|
|
|
@@ -83,7 +105,7 @@ else
|
2006-12-15 18:09:13 +01:00
|
|
|
fi
|
|
|
|
if test "$ANS" != 's'; then
|
|
|
|
echo "------> $FILE <------"
|
|
|
|
- gzip -cdfq -- "$FILE" | eval ${PAGER-more}
|
|
|
|
+ gzip -cdfq -- "$FILE" | pager
|
|
|
|
fi
|
|
|
|
if test -t 1; then
|
|
|
|
FIRST=0
|