Define fzf configuration for ZSH only if available.
This commit is contained in:
parent
5955ac6b4b
commit
4b17151fea
15
zshrc
15
zshrc
|
@ -705,6 +705,20 @@ function translate()
|
|||
}
|
||||
|
||||
## fzf
|
||||
if [ -d ~/.fzf ]; then
|
||||
# Setup fzf
|
||||
# ---------
|
||||
if [[ ! "$PATH" == *$HOME/.fzf/bin* ]]; then
|
||||
export PATH="$PATH:$HOME/.fzf/bin"
|
||||
fi
|
||||
|
||||
# Auto-completion
|
||||
# ---------------
|
||||
[[ $- == *i* ]] && source "$HOME/.fzf/shell/completion.zsh" 2> /dev/null
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
source "$HOME/.fzf/shell/key-bindings.zsh"
|
||||
|
||||
# ff - cd to selected directory (exclude hidden directories
|
||||
ff() {
|
||||
|
@ -763,6 +777,7 @@ cf() {
|
|||
fi
|
||||
}
|
||||
|
||||
fi
|
||||
|
||||
################################################
|
||||
# 2. Prompt et définition des touches basiques #
|
||||
|
|
Loading…
Reference in New Issue