mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2025-01-22 10:44:21 +00:00
Move fzf shell integrations
This commit is contained in:
parent
36e0726e56
commit
d0fb84b8f7
@ -89,6 +89,26 @@ if fc-list -q 'Symbols Nerd Font'; then
|
|||||||
export TERM_NERD_FONT=1
|
export TERM_NERD_FONT=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# FZF
|
||||||
|
if[ -f ~/.fzf.bash ]; then
|
||||||
|
source ~/.fzf.bash
|
||||||
|
elif fzf --bash &> /dev/null; then
|
||||||
|
source <(fzf --bash)
|
||||||
|
else
|
||||||
|
if [ -d /opt/local/share/fzf/shell ]; then
|
||||||
|
fzf_shell_path=/opt/local/share/fzf/shell
|
||||||
|
elif [ -d /usr/share/doc/fzf/examples/ ]; then
|
||||||
|
fzf_shell_path=/usr/share/doc/fzf/examples
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$fzf_shell_path" ]; then
|
||||||
|
# Auto-completion
|
||||||
|
[[ $- == *i* ]] && source $fzf_shell_path/completion.bash 2> /dev/null
|
||||||
|
|
||||||
|
# Key bindings
|
||||||
|
source $fzf_shell_path/key-bindings.bash
|
||||||
|
end
|
||||||
|
fi
|
||||||
if type rg &> /dev/null; then
|
if type rg &> /dev/null; then
|
||||||
export FZF_DEFAULT_COMMAND='rg --files'
|
export FZF_DEFAULT_COMMAND='rg --files'
|
||||||
# export FZF_DEFAULT_COMMAND='rg --files --no-ignore-vcs --hidden'
|
# export FZF_DEFAULT_COMMAND='rg --files --no-ignore-vcs --hidden'
|
||||||
|
@ -161,7 +161,25 @@ if fc-list -q 'Symbols Nerd Font'; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# FZF
|
# FZF
|
||||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
if [ -f ~/.fzf.zsh ]; then
|
||||||
|
source ~/.fzf.zsh
|
||||||
|
elif fzf --zsh 2&> /dev/null; then
|
||||||
|
source <(fzf --zsh)
|
||||||
|
else
|
||||||
|
if [ -d /opt/local/share/fzf/shell ]; then
|
||||||
|
fzf_shell_path=/opt/local/share/fzf/shell
|
||||||
|
elif [ -d /usr/share/doc/fzf/examples/ ]; then
|
||||||
|
fzf_shell_path=/usr/share/doc/fzf/examples
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$fzf_shell_path" ]; then
|
||||||
|
# Auto-completion
|
||||||
|
[[ $- == *i* ]] && source $fzf_shell_path/completion.zsh 2> /dev/null
|
||||||
|
|
||||||
|
# Key bindings
|
||||||
|
source $fzf_shell_path/key-bindings.zsh
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if type rg &> /dev/null; then
|
if type rg &> /dev/null; then
|
||||||
export FZF_DEFAULT_COMMAND='rg --files'
|
export FZF_DEFAULT_COMMAND='rg --files'
|
||||||
# export FZF_DEFAULT_COMMAND='rg --files --no-ignore-vcs --hidden'
|
# export FZF_DEFAULT_COMMAND='rg --files --no-ignore-vcs --hidden'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user