Both of these are correct invocations, though maybe a little counterintuitive. Certainly the parser does not need improving (but you are free to argue that the command-line syntax does:).

Justin Pryzby wrote:
IMO this should give a more useful error about "Missing connector
(--and?)":

$ grep-aptavail -F Package asdfadsffasdf -F Package asdfasdfasdf grep-aptavail: 
asdfasdfasdf: No such file or directory

This is equivalent to

  grep-aptavail -FPackage,Package asdfadsffasdf asdfasdfasdf

which is a shorthand for

  grep-aptavail -FPackage asdfadsffasdf --or \
                -FPackage asdfadsffasdf asdfasdfasdf

And the following should not work at all, since the second -F Package
has no pattern (which is required for the first one):
$ grep-aptavail -F Package asdfadsffasdf -F Package

And this is equivalent to

  grep-aptavail -FPackage,Package asdfadsffasdf

which is a shorthand for

  grep-aptavail -FPackage asdfadsffasdf --or -FPackage asdfadsffasdf


I see two possible ways to change the command-line syntax to make these illegal:

   1) forbid multiple -F's
   2) forbid specifying the same field twice for an atom

I don't like either. 1) breaks backwards-compatibility from the pre-boolean days, 2) takes too much work for too little gain (and only solves the problem for a special case).

Thoughts?


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

Reply via email to