Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: cd directory completion?



On Mon, Aug 23, 1999 at 04:07:16PM +0200, Dominik Vogt wrote:
> 
> Looks pretty much like the stuff I use. In the end all compctl
> configs end up the same :-) But I wonder why you use whence
> and where at all (do you?). It's so much easier to just type
> 
>   # ls =filename
> 
> and hit TAB :-))

	yes, but that returns totally different information, especially in
zsh, where which and type are just cosmetic variants of whence--all three
thus go through the entire process of command lookup, including functions
and builtins.  the =<command> syntax just does alias expansion and 
executable searching via path, while (k/c)sh-style which just does executable
searching; these two also thus do not provide any information about whether 
some command is a function or a builtin, and don't expand aliases/functions/
builtins so that you can quickly see their definition without looking at
source files, etc.

	(i personally think the zsh versions of those commands should mirror 
the equivalent ksh tools in behaviour (it's sometimes very useful to only
do executable searching, for example), but since /bin/which and /bin/type
exist and act like the ksh versions, i've just aliased which and type to 
their executable versions.  (of course, then you have issues figuring out
just what `alias which=/bin/which ; alias which=$(whence -a which | head -1)' 
does, but that's what makes playing with your shell fun.))

	-- sweth.

-- 
Sweth Chandramouli ; <sweth@xxxxxxx>
<a href="http://astaroth.nit.gwu.edu/resume/";>Will Work For Food.</a>
<a href="http://astaroth.nit.gwu.edu/~sweth/disc.html";>*</a>



Messages sorted by: Reverse Date, Date, Thread, Author