zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: find real path of a zsh completion function
Date: Wed, 11 Oct 2017 11:56:09 +0100	[thread overview]
Message-ID: <20171011115609.34763c7d@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <CAEwkUWM1q52JEOEk6NRQT1qSsAZCKLAi51fG7G2O5XuwrnzycA@mail.gmail.com>

On Wed, 11 Oct 2017 07:09:57 -0300
Filipe Silva <filipe.silva@gmail.com> 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


  parent reply	other threads:[~2017-10-11 10:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20171011101129epcas3p38e04cd35c940d032ee7ededbadb5914b@epcas3p3.samsung.com>
2017-10-11 10:09 ` Filipe Silva
2017-10-11 10:26   ` Eric Cook
2017-10-11 10:56   ` Peter Stephenson [this message]
2017-10-12  7:09   ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171011115609.34763c7d@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).