bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Patch] Locate: New option: --and


From: Bas van Gompel
Subject: Re: [Patch] Locate: New option: --and
Date: Sun, 12 Jun 2005 20:33:40 +0200 (MET DST)
User-agent: slrn/0.9.8.1 (Win32) Hamster/2.0.6.0 KorrNews/4.2

Op Sat, 11 Jun 2005 23:40:34 +0100 schreef James Youngman
in <address@hidden>:
[locate -a]

:  It's a good idea.  However, "find" uses "-a" for and, like this 
:
:     find path predicate1 -a predicate2 -a predicate3
:
:  which allows this to make sense as well
:
:    find path predicate1 -a ( predicate2 -o predicate3 )
:
:  therefore if we're having an option of this sort in "locate" I'd
:  prefer it either 
:
:  1. to follow the pattern of "find" for consistency (hence reducing the
:  unexpectedness of the command line interface) - meaning that one would
:  put the "-a" between patterns that one expects to both be matched

That would/will be hard to implement. considering how `locate' currently
handles options (using getop_long).

:  or
:
:  2. call the option "--all" instead of "-and" to not have the short
:  form "-a".  This allows us the option to later implement "-a" like
:  find.

Fine by me... `-A' and `--all'? Should I supply a new patch?

...

I would like to note the UI and structure of `find' and `locate'
are quite different. For `locate' to understand predicates would
require significant refactoring (I for one don't intend to do).

:  Any comments from other list members?   
Any comments from other list members?


L8r,

Buzz.
-- 
  ) |  | ---/ ---/  Yes, this | This message consists of true | I do not
--  |  |   /    /   really is |   and false bits entirely.    | mail for
  ) |  |  /    /    a 72 by 4 +-------------------------------+ any1 but
--  \--| /--- /---  .sigfile. |   |perl -pe "s.u(z)\1.as."    | me. 4^re




reply via email to

[Prev in Thread] Current Thread [Next in Thread]