aports/community/fzf/fzf.plugin.zsh
Jakub Jirutka e7e2ff35c3 community/fzf: rename -completion subpackages, switch to plugin convention
completion.{bash,zsh} are not completion functions for the fzf command
command, but hooks into the shell completion system. Thus they shouldn't
be installed in the locations for command completions, nor provided by
*-{bash,zsh}-completion packages. It's not just semantically wrong, it
even doesn't work for Zsh.

main/zsh now provides a simple plugin loader - when the plugin convention
is followed, the user can easily load the fzf scripts just by creating
a symlink ~/.local/share/zsh/plugins/fzf -> /usr/share/zsh/plugins/fzf
or by adding `ZSH_LOAD_SYSTEM_PLUGINS=yes` into `.zshenv` or using a
third-party plugin manager.

The same approach is now used in community/skim and most of the packages
providing some Zsh plugin/extension (and a few for Bash plugins).
2022-04-02 19:10:08 +00:00

7 lines
242 B
Bash

# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html#zero-handling
0="${ZERO:-${${0:#$ZSH_ARGZERO}:-${(%):-%N}}}"
0="${${(M)0:#/*}:-$PWD/$0}"
source "${0:A:h}/completion.zsh"
source "${0:A:h}/key-bindings.zsh"