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

Re: find real path of a zsh completion function



On Wed, 11 Oct 2017 07:09:57 -0300
Filipe Silva <filipe.silva@xxxxxxxxx> wrote:
> Hi. I'm trying to write a custom completion function for golang's go
> command line, since none that works is available.
> 
> First thing I notice is that zsh already ships with a `_go` completion
> function (which does not complete the go command) which is installed to
> /usr/share/zsh/functions or something. so I rename that file.
> 
> now if I write `$ which _go` there is still a _go file somewhere:
> 
> _go () {
> # undefined
> builtin autoload -XUz
> }
> 
> where is this file coming from? I've already searched through all of my
> $fpath dirs.

Make quite sure what fpath compinit is using, i.e. the one you have
set is already in effect at that point. "functions -T compinit" before
running it will output debug.  It will also show if it's using a cached
dump file (value of $_comp_dumpfile), which you can then delete by hand
so it will recreate it --- that would add the autoload without checking
fpath.

print -l ${^fpath}/_go(N)

will show you any _go in the fpath.

pws



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