zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: <zsh-users@zsh.org>
Subject: Re: Having a hard time dealing with a completion collision
Date: Wed, 19 Feb 2020 09:35:20 +0000	[thread overview]
Message-ID: <1582104920.6506.3.camel@samsung.com> (raw)
In-Reply-To: <20200218191720.ae3fafhyrrqch5um@NUX>

On Tue, 2020-02-18 at 21:17 +0200, Doron Behar wrote:
> On Tue, Feb 18, 2020 at 05:02:20PM +0000, Peter Stephenson wrote:
> > 
> > The files have different names, so they're both loaded.  To get the
> > first file to be loaded used by compdef, remove the ~/.zcompdump* file
> > --- exact names vary depending on configuration but it's safe to
> > remove any you find --- and it will be regenerated with the correct
> > configuration next time you start the shell.
> If I remove the ~/.zcompdump* files and don't ran the `compdef` command,
> the same issue occurs.

That suggests something unusual in your set up as the compinit script
handles this case by design.  For example,

- fpath is being modified after compinit;
- something is using "compdef" explicitly for the wrong function.

Obviously, those are just random guesses.  You can get a bit further
by looking in the appropriate .zcompdump file.  If it's showing
the wrong function, that suggests the fpath was not set up
correctly at the point compinit was run.  If it's showing
the right function, something monkeyed with the definition later.
  
If you care enough, you could instrument compdef to print a message
when it handles one of the two functions.

However, your workaround of using compdef by hand will be fine.

pws


      reply	other threads:[~2020-02-19  9:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200218163908eucas1p28a3b95a5e11163f515ee6e902ff9bbf5@eucas1p2.samsung.com>
2020-02-18 16:37 ` Doron Behar
2020-02-18 16:50   ` Daniel Shahaf
2020-02-18 19:13     ` Doron Behar
2020-02-18 17:02   ` Peter Stephenson
2020-02-18 19:17     ` Doron Behar
2020-02-19  9:35       ` Peter Stephenson [this message]

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=1582104920.6506.3.camel@samsung.com \
    --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).