Bug#798180: ack-grep: should not strip leading "./" from filenames
Jakub Wilk
jwilk at debian.org
Sun Sep 6 13:47:32 UTC 2015
Hi Axel!
* Axel Beckert <abe at debian.org>, 2015-09-06, 15:39:
>>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.
OK, thanks.
>>$ 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 --
Yeah, but "--" is a GNUism. It works with rm, but not necessarily with
other tools.
--
Jakub Wilk
More information about the pkg-perl-maintainers
mailing list