# Setup fzf
# ---------
if [[ "$(uname -m)" == "arm64" ]]; then
  # ARM-based Mac (Apple Silicon)
  FZF_PATH="/opt/homebrew/opt/fzf"
else
  # Intel-based Mac
  FZF_PATH="/usr/local/opt/fzf"
fi

if [[ ! "$PATH" == *$FZF_PATH/bin* ]]; then
  PATH="${PATH:+${PATH}:}$FZF_PATH/bin"
fi

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

# Key bindings
# ------------
source "$FZF_PATH/shell/key-bindings.zsh"

