zsh-workers
 help / color / mirror / code / Atom feed
* _find or _users broken?
@ 2000-04-29 12:58 Adam Spiers
  2000-04-29 17:39 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Spiers @ 2000-04-29 12:58 UTC (permalink / raw)
  To: zsh workers mailing list

$ find -user <TAB>
---- user
---- directory
<list of directories and users together>
$ find ! -user <TAB>
---- directory
<list of directories>

Why is it completing directories at all?  And when it completes users
and directories, why are the users listed under the directory group?


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: _find or _users broken?
  2000-04-29 12:58 _find or _users broken? Adam Spiers
@ 2000-04-29 17:39 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2000-04-29 17:39 UTC (permalink / raw)
  To: Adam Spiers, zsh workers mailing list

On Apr 29,  1:58pm, Adam Spiers wrote:
} Subject: _find or _users broken?
}
} $ find -user <TAB>
} ---- user
} ---- directory
} <list of directories and users together>
} $ find ! -user <TAB>
} ---- directory
} <list of directories>
} 
} Why is it completing directories at all?  And when it completes users
} and directories, why are the users listed under the directory group?

That part must have something to do with your settings.  The final clause
of the _arguments call in _find is to complete directories when nothing
else matches.

There is something going wrong, though:

zagzig[103] find -user <TAB>
Completing user
(list of users only)
zagzig[103] find /tmp -user <TAB>
(feep, no completions)

This (and your case with `!') appears to happen because comparguments
believes the list of options to have been finished when /tmp was put
on the line, i.e., it doesn't deal well with commands whose options
follow a list of non-option arguments.

It may be necessary to rewrite _find using _regex_arguments, or to go
to a state-machine rather than a simple usage of _arguments.  I'm not
yet clever enough with _arguments to figure out a workaround, and I'm
totally unfamiliar with _regex_arguments.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-04-29 17:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-29 12:58 _find or _users broken? Adam Spiers
2000-04-29 17:39 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).