diff --git a/.config/zsh/.fzf.zsh b/.config/zsh/.fzf.zsh new file mode 100644 index 0000000..bcae1b9 --- /dev/null +++ b/.config/zsh/.fzf.zsh @@ -0,0 +1,13 @@ +# Setup fzf +# --------- +if [[ ! "$PATH" == */usr/local/opt/fzf/bin* ]]; then + export PATH="${PATH:+${PATH}:}/usr/local/opt/fzf/bin" +fi + +# Auto-completion +# --------------- +[[ $- == *i* ]] && source "/usr/local/opt/fzf/shell/completion.zsh" 2> /dev/null + +# Key bindings +# ------------ +source "/usr/local/opt/fzf/shell/key-bindings.zsh" diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 6ec5431..6a93f4e 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -14,6 +14,8 @@ if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then print -P "%F{160}▓▒░ The clone has failed.%f%b" fi +source "${ZDOTDIR:-$HOME}/.fzf.zsh" + source "$HOME/.zinit/bin/zinit.zsh" autoload -Uz _zinit (( ${+_comps} )) && _comps[zinit]=_zinit