summaryrefslogtreecommitdiff
path: root/plugins/fzf
diff options
context:
space:
mode:
authorMeng Bo <mengbo@lnu.edu.cn>2019-11-28 22:41:58 +0800
committerMarc Cornellà <marc.cornella@live.com>2019-11-28 15:41:58 +0100
commit6390afd6de2978ca19920adb4d8958c1ee788f49 (patch)
tree1dac34246a0d965671de70e3a6aee260657014b8 /plugins/fzf
parent671d21ac5305e815668500563a6b7ef61057b659 (diff)
downloadzsh-6390afd6de2978ca19920adb4d8958c1ee788f49.tar.gz
zsh-6390afd6de2978ca19920adb4d8958c1ee788f49.tar.bz2
zsh-6390afd6de2978ca19920adb4d8958c1ee788f49.zip
fzf: change debian completion file path (#8402)
* Newer Debian packages install completions file in /usr/share/doc/fzf/examples/completion.zsh * Default to buster/stretch path if completion file not found See file list in order from older to newer fzf package versions: - https://packages.debian.org/stretch-backports/amd64/fzf/filelist - https://packages.debian.org/buster/amd64/fzf/filelist - https://packages.debian.org/bullseye/amd64/fzf/filelist - https://packages.debian.org/sid/amd64/fzf/filelist Co-authored-by: Marc Cornellà <marc.cornella@live.com>
Diffstat (limited to 'plugins/fzf')
-rw-r--r--plugins/fzf/fzf.plugin.zsh5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh
index fe471a363..83626009d 100644
--- a/plugins/fzf/fzf.plugin.zsh
+++ b/plugins/fzf/fzf.plugin.zsh
@@ -67,7 +67,10 @@ function setup_using_debian_package() {
# NOTE: There is no need to configure PATH for debian package, all binaries
# are installed to /usr/bin by default
- local completions="/usr/share/zsh/vendor-completions/_fzf"
+ # Determine completion file path: first bullseye/sid, then buster/stretch
+ local completions="/usr/share/doc/fzf/examples/completion.zsh"
+ [[ -f "$completions" ]] || completions="/usr/share/zsh/vendor-completions/_fzf"
+
local key_bindings="/usr/share/doc/fzf/examples/key-bindings.zsh"
# Auto-completion