Package: grep
Version: 2.5.3~dfsg-6
Severity: wishlist

grep should have an option to filter non-printable characters from
the contents (file contents, but also filenames -- see bug #42630)
*before coloring*. The values could be "never", "always" and "auto",
like with --color.

Such an option would be useful because:

1. The option --binary-files is a heuristic only; the user may want
   to have more information on binary files anyway.

2. It is not even possible to write a wrapper script when coloring is
   used, because after coloring, it is not possible (or at least very
   difficult) to do the difference between escape sequences from grep
   and those from the original contents.

Such non-printable characters could be either replaced by some
locale-specific replacement character or transcoded.

I wonder whether filtering should be the default when the output
is connected to a terminal (and when POSIXLY_CORRECT is not set).
It would not be worse than the default --binary-files=binary.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26.3-20080822 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages grep depends on:
ii  libc6                         2.7-13     GNU C Library: Shared libraries

grep recommends no packages.

grep suggests no packages.

-- no debconf information



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

Reply via email to