mirror of
https://github.com/Stunkymonkey/dotfiles.git
synced 2025-05-24 02:54:40 +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
|
||||
|
||||
[ -r /usr/share/fzf/key-bindings.bash ] && . /usr/share/fzf/key-bindings.bash
|
||||
[ -r /usr/share/fzf/completion.bash ] && . /usr/share/fzf/completion.bash
|
||||
|
||||
if command -v fzf-share >/dev/null; then
|
||||
source "$(fzf-share)/key-bindings.bash"
|
||||
source "$(fzf-share)/completion.bash"
|
||||
# Arch
|
||||
if [ "${BASH_VERSION}" ] && [ -r /usr/share/fzf/key-bindings.bash ]; then
|
||||
# shellcheck source=/dev/null
|
||||
. /usr/share/fzf/key-bindings.bash
|
||||
fi
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue