Skip to content

Commit

Permalink
feat(fzf): add support for Fedora package (ohmyzsh#12421)
Browse files Browse the repository at this point in the history
  • Loading branch information
jukuisma authored May 15, 2024
1 parent b1c5315 commit a8a747e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions plugins/fzf/fzf.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,27 @@ function fzf_setup_using_opensuse() {
return 0
}

function fzf_setup_using_fedora() {
(( $+commands[fzf] )) || return 1

local completions="/usr/share/zsh/site-functions/fzf"
local key_bindings="/usr/share/fzf/shell/key-bindings.zsh"

if [[ ! -f "$completions" || ! -f "$key_bindings" ]]; then
return 1
fi

if [[ -o interactive && "$DISABLE_FZF_AUTO_COMPLETION" != "true" ]]; then
source "$completions" 2>/dev/null
fi

if [[ "$DISABLE_FZF_KEY_BINDINGS" != "true" ]]; then
source "$key_bindings" 2>/dev/null
fi

return 0
}

function fzf_setup_using_openbsd() {
# openBSD installs fzf in /usr/local/bin/fzf
if [[ "$OSTYPE" != openbsd* ]] || (( ! $+commands[fzf] )); then
Expand Down Expand Up @@ -234,6 +255,7 @@ fzf_setup_using_fzf \
|| fzf_setup_using_openbsd \
|| fzf_setup_using_debian \
|| fzf_setup_using_opensuse \
|| fzf_setup_using_fedora \
|| fzf_setup_using_cygwin \
|| fzf_setup_using_macports \
|| fzf_setup_using_base_dir \
Expand Down

0 comments on commit a8a747e

Please sign in to comment.