On Thu, Jan 16, 2020 at 03:49:43PM +0000, Edd Barrett wrote: > Hi, > > On Thu, Jan 16, 2020 at 08:47:43AM -0600, Matthew Martin wrote: > > On Thu, Jan 16, 2020 at 03:32:36PM +0100, Klemens Nanni wrote: > > > On Thu, Jan 16, 2020 at 02:20:09PM +0000, Edd Barrett wrote: > > > > > > export FZF_DEFAULT_OPTS="--ansi" > > > > . /usr/local/share/fzf/shell/key-bindings.zsh > > > > . /usr/local/share/fzf/shell/completion.zsh > > > > ``` > > > The usual patterns for zsh are the following > > > > > > /usr/local/share/zsh/vendor-completions/_fzf > > > /usr/local/share/zsh/site-functions/_fzf > > > > At least for zsh /usr/local/share/zsh/site-functions/_fzf should be used > > since it's in the default fpath. Not sure where vendor-completions came > > from; it doesn't occur anywhere in the zsh source. > > It'd be good to know when to use which of these two paths. Our packages > seem to use both:
Did a grep of vendor-completions in the ports tree. Some of the usages are from flags specified in the port's Makefile (mpv, khard, exa, google-cloud-sdk, and rclone) and others come from the upstream build (quodlibet, keyringer, zathura, xwallpaper). zathura has since changed to site-functions[1] but updating also requires a girara update. I'll take a look at updating both tonight and the first set of ports if no one beats me to them. 1: https://git.pwmt.org/pwmt/zathura/merge_requests/22 > As you say, only site-functions is in the default fpath... > > Also we have two fzf files to install, so do we concatenate them, or call one > _fzf_bindings and the other _fzf_completions, or does one file go in > each of the above directories? > > Do you have to do anything to have functionality loaded from fpath? I > was expecting these files to be automatically sourced, but it seems they > are not... For completers as long as the file is in fpath when compinit is called and starts with a #compdef line it will be automatically picked up and loaded when needed. Other files need to be autoloaded manually.