fzf support for root user

This commit is contained in:
Simon Rieger 2025-01-24 14:35:03 +01:00
parent c7dffe1f13
commit 8548ab75f9

View file

@ -1,13 +1,13 @@
# Setup fzf
# ---------
if [[ ! "$PATH" == */home/{{ .chezmoi.username }}/.fzf/bin* ]]; then
PATH="${PATH:+${PATH}:}/home/{{ .chezmoi.username }}/.fzf/bin"
if [[ ! "$PATH" == *$HOME/.fzf/bin* ]]; then
PATH="${PATH:+${PATH}:}$HOME/.fzf/bin"
fi
# Auto-completion
# ---------------
[[ $- == *i* ]] && source "/home/{{ .chezmoi.username }}/.fzf/shell/completion.bash" 2> /dev/null
[[ $- == *i* ]] && source "$HOME/.fzf/shell/completion.bash" 2> /dev/null
# Key bindings
# ------------
source "/home/{{ .chezmoi.username }}/.fzf/shell/key-bindings.bash"
source "$HOME/.fzf/shell/key-bindings.bash"