On Mon 05 Sep 2005 at 14:26:31 +0200, you wrote:

> X-Loop: [EMAIL PROTECTED]
> Reply-To: Jakob Bohm <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> X-Debian-PR-Message: report 318571
> X-Debian-PR-Package: bash
> X-Debian-PR-Keywords: 
> X-Mailer: reportbug 3.15
> Delivered-To: [EMAIL PROTECTED]
> X-Virus-Scanned: by amavisd-new at cs.tu-berlin.de (including spamassassin)
> X-Spam-Status: No, hits=0 tagged_above=0 required=3 tests=
> X-Spam-Level: 
> Resent-From: Jakob Bohm <[EMAIL PROTECTED]>
> Resent-To: debian-bugs-dist@lists.debian.org
> Resent-CC: Matthias Klose <[EMAIL PROTECTED]>
> Resent-Date: Sat, 16 Jul 2005 07:18:02 UTC
> Resent-Message-ID: <[EMAIL PROTECTED]>
> Resent-Sender: Debian BTS <[EMAIL PROTECTED]>
> From: Jakob Bohm <[EMAIL PROTECTED]>
> To: Debian Bug Tracking System <[EMAIL PROTECTED]>
> Subject: Bug#318571: bash: [completion] less and zless completion (almost) 
> swapped, zless is superset
> Date: Sat, 16 Jul 2005 09:04:12 +0200
> 
> Package: bash
> Version: 3.0-15
> Severity: minor
> 
> Currently, bash completion assumes that less can handle any file while zless
> can handle only .gz files.  This is wrong, zless can handle both gzipped and
> plain files, less cannot handle gzipped files (unless lessopen or similar is
> used).
> 
> An important situation where this happens is when reading package
> documentation by typing zless /usr/share/doc/somepackage/<TAB> .
> With the current expansion, uncompressed files are not proposed, which is a
> problem because policy is to compress or not compress those files based on
> their size, making the subset rather random.
> 
> Thus I respectfully suggest that completion for less, zless and any similar
> rules (bzless ? zcat ?) be changed as follows:
> 
> Current behaviour
>    less  expansion includes uncompressed files
>    zless expansion omits uncompressed files
>    both  expansions include .gz files etc. but only zless can actually use
>         them.
> 
> Suggested new behaviour:
>    less  expansion omits .gz .z .Z .tgz and .bz2 files
>    zless expansion does not omit these files
>    both  expansions include uncompressed files

Unfortunately, this is highly distribution-specific.

On my FC4 system, for example, less will correctly view gzipped files,
RPM packages and other file types, thanks to LESSOPEN. On the other
hand, zless won't handle most of these, because it is itself just an
application of the LESSOPEN facility.

I suggest that this be tackled locally by each distribution, as it's
rather hard for the completion code to figure out on the fly how less
has been extended by the use of LESSOPEN.

Cheers,

Ian
-- 
Ian Macdonald               | Real Programmers think better when playing 
[EMAIL PROTECTED]             | Adventure or Rogue. 
http://www.caliban.org/     | 
                            | 
                            | 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to