From c7dffe1f135017f363c6cfc32da46c1b4557729f Mon Sep 17 00:00:00 2001 From: Simon Rieger Date: Fri, 24 Jan 2025 14:34:06 +0100 Subject: [PATCH] fzf support for root user --- .chezmoitemplates/fzf-zsh_linux.tmpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.chezmoitemplates/fzf-zsh_linux.tmpl b/.chezmoitemplates/fzf-zsh_linux.tmpl index b93bed8..cca3148 100644 --- a/.chezmoitemplates/fzf-zsh_linux.tmpl +++ b/.chezmoitemplates/fzf-zsh_linux.tmpl @@ -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.zsh" 2> /dev/null +[[ $- == *i* ]] && source "$HOME/.fzf/shell/completion.zsh" 2> /dev/null # Key bindings # ------------ -source "/home/{{ .chezmoi.username }}/.fzf/shell/key-bindings.zsh" +source "$HOME/.fzf/shell/key-bindings.zsh"