mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
xzless: Fix less(1) version detection when it contains a dot.
Sometimes the version number from "less -V" contains a dot, sometimes not. xzless failed detect the version number when it does contain a dot. This fixes it. Thanks to nick87720z for reporting this. Apparently it had been reported here <https://bugs.gentoo.org/489362> in 2013.
This commit is contained in:
parent
5fb5212d81
commit
96f5a28a46
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ if test "${LESSMETACHARS+set}" != set; then
|
||||||
LESSMETACHARS="$space$tab$nl'"';*?"()<>[|&^`#\$%=~'
|
LESSMETACHARS="$space$tab$nl'"';*?"()<>[|&^`#\$%=~'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$(less -V | { read _ ver _ && echo ${ver}; })" -ge 429; then
|
if test "$(less -V | { read _ ver _ && echo ${ver%%.*}; })" -ge 429; then
|
||||||
# less 429 or later: LESSOPEN pipe will be used on
|
# less 429 or later: LESSOPEN pipe will be used on
|
||||||
# standard input if $LESSOPEN begins with |-.
|
# standard input if $LESSOPEN begins with |-.
|
||||||
LESSOPEN="|-$xz -cdfq -- %s"
|
LESSOPEN="|-$xz -cdfq -- %s"
|
||||||
|
|
Loading…
Reference in a new issue