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

Re: How completions work, do they require fpath?



I've found following line in compaudit command:

  if [[ $#_i_files -lt 20 || $_compdir = */Base || -d $_compdir/Base ]]; then

So this suggests that if there is Base sub directory in $_compdir, it
will be used by completion. Tested this and that's true. Quite
contradict to manual which says:

"For  incomplete  installations,  if compinit does not find enough
files eginning with an underscore (fewer than twenty) in the search
path, it will try to find more by adding the directory _compdir  to
the  search path."

Anyway, it seems that I will be able to add completions as follows: a)
create completions/Base/Core directory following the following lines
from compaudit:

    if [[ -d $_compdir/Base/Core ]]; then
      # Add all the Completion subdirectories (CVS-layout)
      _i_addfiles=(${_compdir}/*/*(/^M))

b) mkdir plugin's directory in Base
c) simlink completion files (starting with "_") into that subdirectory
c) set _compdir and run compinit

Best regards,
Sebastian Gniazdowski



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