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

Re: = completion

Hash: SHA1

On Saturday 26 November 2005 22:22, Seth Kurtzberg wrote:
> In each of the following, however, tab completion does not work (that
> is, no completion occurs):
>     export abc=/whatever:$abc   (obviously I attempt tab completion
> before adding the :$abc)

Works fine and with COMPLETE_IN_WORD set also in the middle of string

>     dd if=./whatever

Of course works too.

Which zsh version and completion style do you use? I am not sure if compctl 
does what you want (I have not used it for years) but new compsys does. If 
you have zsh 4.2.x, try

autoload -U compinit; compinit

to initialize completion system.

> The latter is an example of using arg=/some/path which occurs for
> various commands, so dd is just an example and the question is not in
> any way specific to dd.

It is. Completion is context-sensitive. It knows that export expects 
(path-)assignment; that for dd if= has path as argument; but it has no way to 
know this for arbitrary command "foo". While it is possible to fallback to 
something like dd does, I am now sure it is good idea; you probably need it 
only for several commands and it is likely zsh already includes suitable 
completion for them.

> I do have the options related to equals completion enabled.

Which suggests you are using compctl.

> I also tried this on a new install of linux

This satement is meaningless :) Which distribution, which version? Some of 
them may use compsys by default some not. Anyway, just try compinit as above 
and if it works, try compinstall that will help you to setup new completion 

BTW zsh-users would be more appropriate for such questions.

- -andrey
Version: GnuPG v1.4.2 (GNU/Linux)


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