Bug#798180: ack-grep: should not strip leading "./" from filenames

Axel Beckert abe at debian.org
Sun Sep 6 13:39:14 UTC 2015


Control: tag -1 + upstream
Control: found -1 2.15.01-1
Control: found -1 ack/2.15.01-2

Hi Jakub,

Jakub Wilk wrote:
> When ack prints filenames, it strips leading "./". This is harmful
> when you pass these filenames to another program, because a filename
> starting with "--" might be interpreted as an option:

I'll forward it to upstream, but I wouldn't wonder if that will be a
wontfix from upstream, as ack is primarily intended for human use (and
not scripting) and there stripping is probably rather a feature and
not a bug.

> $ ls
> --interactive=.html
> $ ack -f --html --print0 ./ | xargs -0 rm -f
> rm: invalid argument ‘.html’ for ‘--interactive’

What about using this?

$ ack -f --html --print0 ./ | xargs -0 rm -f --

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe at debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



More information about the pkg-perl-maintainers mailing list