21 lines
505 B
Bash
Executable file
21 lines
505 B
Bash
Executable file
# Setup fzf
|
|
# ---------
|
|
# Get the path to fzf installed by Nix
|
|
FZF_PATH="$(command -v fzf | xargs dirname)"
|
|
|
|
# Ensure the fzf binary is in the PATH
|
|
if [[ ! "$PATH" == *"$FZF_PATH/bin"* ]]; then
|
|
PATH="${PATH:+${PATH}:}$FZF_PATH/bin"
|
|
fi
|
|
|
|
# Auto-completion
|
|
# ---------------
|
|
if [[ -f "$FZF_PATH/shell/completion.bash" ]]; then
|
|
source "$FZF_PATH/shell/completion.bash"
|
|
fi
|
|
|
|
# Key bindings
|
|
# ------------
|
|
if [[ -f "$FZF_PATH/shell/key-bindings.bash" ]]; then
|
|
source "$FZF_PATH/shell/key-bindings.bash"
|
|
fi
|