2010-01-29 15:00:15 +01:00
|
|
|
Index: zmore.in
|
|
|
|
===================================================================
|
2012-10-17 11:19:18 +02:00
|
|
|
--- zmore.in.orig 2012-01-01 09:53:58.000000000 +0100
|
|
|
|
+++ zmore.in 2012-10-16 13:34:42.842966614 +0200
|
|
|
|
@@ -55,11 +55,34 @@ 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
|
2012-10-17 11:19:18 +02:00
|
|
|
+
|
2006-12-15 18:09:13 +01:00
|
|
|
if test $# = 0; then
|
|
|
|
if test -t 0; then
|
2012-10-17 11:19:18 +02:00
|
|
|
echo >&2 "$0: invalid number of operands; try \`$0 --help' for help"
|
2006-12-15 18:09:13 +01:00
|
|
|
else
|
2012-10-17 11:19:18 +02:00
|
|
|
- gzip -cdfq | eval ${PAGER-more}
|
2006-12-15 18:09:13 +01:00
|
|
|
+ gzip -cdfq | pager
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
FIRST=1
|
2012-10-17 11:19:18 +02:00
|
|
|
@@ -83,7 +106,7 @@ else
|
|
|
|
fi
|
|
|
|
if test "$ANS" != 's'; then
|
|
|
|
echo "------> $FILE <------"
|
|
|
|
- gzip -cdfq -- "$FILE" | eval ${PAGER-more}
|
2006-12-15 18:09:13 +01:00
|
|
|
+ gzip -cdfq -- "$FILE" | pager
|
2012-10-17 11:19:18 +02:00
|
|
|
fi
|
|
|
|
if test -t 1; then
|
|
|
|
FIRST=0
|