mirror of
https://github.com/Stunkymonkey/dotfiles.git
synced 2025-05-24 11:04:41 +02:00
shell/fzf: add multiple methods for loading
This commit is contained in:
parent
0d8a6f0c01
commit
b33e57d67a
1 changed files with 32 additions and 6 deletions
38
shell/fzf.sh
38
shell/fzf.sh
|
@ -1,9 +1,35 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
[ -r /usr/share/fzf/key-bindings.bash ] && . /usr/share/fzf/key-bindings.bash
|
# Arch
|
||||||
[ -r /usr/share/fzf/completion.bash ] && . /usr/share/fzf/completion.bash
|
if [ "${BASH_VERSION}" ] && [ -r /usr/share/fzf/key-bindings.bash ]; then
|
||||||
|
# shellcheck source=/dev/null
|
||||||
if command -v fzf-share >/dev/null; then
|
. /usr/share/fzf/key-bindings.bash
|
||||||
source "$(fzf-share)/key-bindings.bash"
|
fi
|
||||||
source "$(fzf-share)/completion.bash"
|
if [ "${BASH_VERSION}" ] && [ -r /usr/share/fzf/completion.bash ]; then
|
||||||
|
# shellcheck source=/dev/null
|
||||||
|
. /usr/share/fzf/completion.bash
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${ZSH_VERSION}" ] && [ -r /usr/share/fzf/key-bindings.zsh ]; then
|
||||||
|
# shellcheck source=/dev/null
|
||||||
|
. /usr/share/fzf/key-bindings.zsh
|
||||||
|
fi
|
||||||
|
if [ "${ZSH_VERSION}" ] && [ -r /usr/share/fzf/completion.zsh ]; then
|
||||||
|
# shellcheck source=/dev/null
|
||||||
|
. /usr/share/fzf/completion.zsh
|
||||||
|
fi
|
||||||
|
|
||||||
|
# NixOS
|
||||||
|
if [ "${BASH_VERSION}" ] && command -v fzf-share >/dev/null; then
|
||||||
|
# shellcheck source=/dev/null
|
||||||
|
. "$(fzf-share)/key-bindings.bash"
|
||||||
|
# shellcheck source=/dev/null
|
||||||
|
. "$(fzf-share)/completion.bash"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${ZSH_VERSION}" ] && command -v fzf-share >/dev/null; then
|
||||||
|
# shellcheck source=/dev/null
|
||||||
|
. "$(fzf-share)/key-bindings.zsh"
|
||||||
|
# shellcheck source=/dev/null
|
||||||
|
. "$(fzf-share)/completion.zsh"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue