test "X$file" = X- || <"$file" || exit 2
done
-xz1=$xz
-xz2=$xz
+# xz needs -qQ to ignore warnings like unsupported check type.
+xz1="$xz -qQ"
+xz2="$xz -qQ"
xz_status=0
exec 3>&1
*[-.]bz2 | *[-.]tbz | *.tbz2) uncompress="bzip2 -cdf";;
*[-.]lzo | *[-.]tzo) uncompress="lzop -cdf";;
*[-.]zst | *[-.]tzst) uncompress="zstd -cdfq";; # zstd needs -q.
- *) uncompress="$xz -cdf";;
+ *) uncompress="$xz -cdfqQ";; # -qQ to ignore warnings like unsupp. check.
esac
# xz_status will hold the decompressor's exit status.
# Exit status of grep (and in rare cases, printf or sed) is
if test "$(less -V | { read _ ver _ && echo ${ver%%.*}; })" -ge 429; then
# less 429 or later: LESSOPEN pipe will be used on
# standard input if $LESSOPEN begins with |-.
- LESSOPEN="|-$xz -cdfq -- %s"
+ LESSOPEN="|-$xz -cdfqQ -- %s"
else
- LESSOPEN="|$xz -cdfq -- %s"
+ LESSOPEN="|$xz -cdfqQ -- %s"
fi
export LESSMETACHARS LESSOPEN
if test -t 0; then
printf '%s\n' "$usage"; exit 1
else
- $xz -cdfq | eval "${PAGER:-more}"
+ $xz -cdfqQ | eval "${PAGER:-more}"
fi
else
FIRST=1
fi
if test "$ANS" != 's'; then
printf '%s\n' "------> $FILE <------"
- $xz -cdfq -- "$FILE" | eval "${PAGER:-more}"
+ $xz -cdfqQ -- "$FILE" | eval "${PAGER:-more}"
fi
if test -t 1; then
FIRST=0