Alon Bar-Lev <alo...@gentoo.org> wrote: > > Only issue I could not find a solution to is tab completion after '=', > for example: > > xxx --file=<TAB> > > This will not complete files, while it will be nice if it does.
For standard commands, it works as it should. For instance, tar --file=<TAB> chmod --reference=<TAB> dd if=<TAB> all work as excpected. For your own custom-commands, it is usually the best idea to write your own _custom-command completion file for _zsh where you can specify the options and their arguments (and how the option arguments can look like, e.g. whether "=" is acceptable as an option-argument separator) in detail. For instance, gentoo-zsh-completion does this for most commands of gentoo projects, others like eix bring their own completion files. If you don't, you do not get completion for options but only the "generic" completion of filenames (in which case "=" has no magic meaning, of course). > There is magic_equal_subst option which enables that but also cause > harm when using = in other places such as: That's exactly the purpose of magic_equal_subst: To support it for *all* arguments everywhere. Usually there is no point to specify this globally. You can of course set it locally in a specific completion function, in which you want it (although other completion helper functions like _arguments are usually sufficient to treat "=" correctly). > Is there any sequence to enable completion after space without > effecting the entire interpreter? After "space"? I suppose the question you meant is answered above.