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

Re: Having a hard time dealing with a completion collision



Doron Behar wrote on Tue, 18 Feb 2020 18:37 +0200:
> I tried putting the replacement `_todo` file in my first fpath directory
> - `~/.zsh/comp/tested/` but surprisingly I still got the failing devtodo
> completion loaded instead of the replacement completion.

Hmm, interesting question.  «autoload» prefers the first match of
a given /function name/, but it's possible that compsys prefers
the /last/ directory for determining the command-name-to-function-name
mappings?  In which case, putting your _todo in the last directory
might help?  (But read on)

> Assuming I'm not interested in submitting a change to ZSH's source tree,
> what would be the best way to handle this collision?

Run «compdef _todo todo» after compinit.

Cheers,

Daniel



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