package dctrl-tools clone 498360 -1 severity 498360 wishlist retitle 498360 grep-dctrl -X is useless when not restricting to a field retitle -1 the full paragraph should not include its final newline thanks
On Tue, Sep 09, 2008 at 02:04:59PM +0200, Loïc Minier wrote:
> I'd have expected the last command to match "Package: gedit" in all
> fields.
>
> I think this a bug in the parser, it might be that it tries matching
> the whole list of fields and not field by field?
That's exactly what it does. I'm not sure it's a bug, though. Certainly it is
documented:
8<--- from grep-dctrl(1) ------------
By default, the search is a case-sensitive fixed substring match
on each paragraph (in other words, package record) in the input.
...
-X, --exact-match
Do an exact match (as opposed to a substring match) in the cur‐
rent simple filter.
8<-----------------------------------
Granted, the -X option is a bit useless without restricting to all fields.
Classifying as a wishlist.
> This doesn't work either:
> echo "Package: gedit" | grep-dctrl -n -s Package "Package: gedit"
>
> But this works:
> % echo "Package: gedit" | grep-dctrl -n -X -s Package "Package: gedit
> "
> gedit
>
> NB: embedded newline in the last pattern
Ok, that's a separate issue, I think. Cloning.
--
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/
signature.asc
Description: Digital signature

