bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gzip: zless doesn't handle filenames with dollar signs correctly


From: Paul Eggert
Subject: gzip: zless doesn't handle filenames with dollar signs correctly
Date: Fri, 29 Dec 2006 20:09:17 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Thanks for reporting the problem.  This is really a 'less' bug, not a
gzip bug, but I installed the following into upstream gzip to work
around the 'less' bug.

2006-12-29  Paul Eggert  <address@hidden>

        * zless.in: Work around a bug in less 394 and earlier; it
        mishandles $%=~ in file names.  Problem reported by
        Sami Liedes in <http://bugs.debian.org/383358>.

2006-12-29  Paul Eggert  <address@hidden>

        * zless.in: Work around a bug in less 394 and earlier; it
        mishandles $%=~ in file names.  Problem reported by
        Sami Liedes in <http://bugs.debian.org/383358>.

--- zless.in    9 Dec 2006 04:25:56 -0000       1.5
+++ zless.in    30 Dec 2006 04:06:06 -0000
@@ -38,5 +38,16 @@ case $1 in
 --version) exec echo "$version";;
 esac
 
+if test "${LESSMETACHARS+set}" != set; then
+  # Work around a bug in less 394 and earlier;
+  # it mishandles the metacharacters '$%=~'.
+  space=' '
+  tab='        '
+  newline='
+'
+  LESSMETACHARS="$space$tab$newline'"';*?"()<>[|&^`#\$%=~'
+  export LESSMETACHARS
+fi
+
 LESSOPEN="|gzip -cdfq -- %s"; export LESSOPEN
 exec less "$@"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]