Package: dctrl-tools Version: 2.24-3+b1 Severity: wishlist File: /usr/share/man/man1/grep-dctrl.1.gz
Don't you mean "packages" instead of "paragraphs" here: -s field,field, ... | --show-field=field,field, ... Show only the body of these fields from the matching paragraphs. Because, e.g., # grep-status -F Description -s Package -i --eregex dummy\|transitional\|safely\ removed Prints: Package: debian-el Package: imagemagick Package: libgdk-pixbuf2.0-0 Package: libjpeg-dev Package: login Package: mime-support Package: ttf-unifont But both -s and -F would need to be the same for them to be in the same paragraph. Wait! I see, you say: You must give a filter expression on the command line. The filter de‐ fines which kind of paragraphs (aka package records) are output. A ^^^^^^^^^^^^^^^^^^^ simple filter is a search pattern along with any options that modify and fault, the search is a case-sensitive fixed substring match on each paragraph (in other words, package record) in the input. With suitable ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ modifiers, this can be changed: the search can be case-insensitive and But then for the rest of the man page, you assume that "special definition" has been hammered down twice, which must be enough, and the reader won't forget it. Alas, many readers aren't reading the whole man page from top to bottom. Just jumping in to the middle etc. Therefore, I have a simple recommendation: s/paragraph/package record/g for the whole page! Then those two hammerings could be eliminated too. In fact we see a couple of places where you are already taking my advice: % grep-available -P foo which is pretty much the same thing. We can also search in both de‐ scriptions and names; if match is found in either, the package record is printed: % grep-available -P -F Description foo or % grep-available -F Package -F Description foo This kind of search is the exactly same that apt-cache does. Here's one thing neither dpkg nor apt-cache do. Search for a string in the whole status or available file (or any Debian control file, for that matter) and print out all package records where we have a match. P.S., say "if a match", not "if match".