From 4b17151fea4324bc9cb03bf4c313442f769240a7 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Fri, 15 Dec 2017 11:33:40 +0100 Subject: [PATCH] Define fzf configuration for ZSH only if available. --- zshrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/zshrc b/zshrc index 0dc4640..533f583 100644 --- a/zshrc +++ b/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 #