summaryrefslogtreecommitdiff
path: root/.zsh/zshrc/99_fzf
blob: f186c069a2860c5e5de7ae47683d4ee0219907fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# zshenv/99_fzf
#
# Set up fzf (https://github.com/junegunn/fzf)
#
# Copyright © 2022 Tobias Klauser <tklauser@distanz.ch>
#
# Source repository: git://git.distanz.ch/dotfiles/zsh.git

FZF="${HOME}/.fzf"
# Installed using Homebrew
[ -d $FZF ] || FZF="/usr/local/opt/fzf"
[ -d $FZF ] || FZF="/opt/homebrew/opt/fzf"

if [ -d $FZF ] ; then
  path_append $FZF/bin

  # Auto-completion
  [[ $- == *i* ]] && source "${FZF}/shell/completion.zsh" 2> /dev/null

  # Key bindings
  source "${FZF}/shell/key-bindings.zsh"
fi