Fzf: Difference between revisions

imported>Nix
m add Software/Applications subcategory
update fzf shell integration
Line 10: Line 10:
To enable fzf in bash add the following line to .bashrc
To enable fzf in bash add the following line to .bashrc


<syntaxhighlight lang="bash">if command -v fzf-share >/dev/null; then
<syntaxhighlight lang="bash">eval "$(fzf --bash)"</syntaxhighlight>
  source "$(fzf-share)/key-bindings.bash"
  source "$(fzf-share)/completion.bash"
fi</syntaxhighlight>


== zsh ==
== zsh ==
Line 19: Line 16:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
if [ -n "${commands[fzf-share]}" ]; then
eval "$(fzf --zsh)"
  source "$(fzf-share)/key-bindings.zsh"
  source "$(fzf-share)/completion.zsh"
fi
</syntaxhighlight>
</syntaxhighlight>


Line 29: Line 23:


<syntaxhighlight lang="fish">
<syntaxhighlight lang="fish">
function fish_user_key_bindings
fzf --fish | source
  if command -s fzf-share >/dev/null
    source (fzf-share)/key-bindings.fish
  end
 
  fzf_key_bindings
end
</syntaxhighlight>
</syntaxhighlight>