From 672ea43d5ebb24e0422416e979900420d4b82ab1 Mon Sep 17 00:00:00 2001 From: Simon Rieger Date: Sun, 19 Jan 2025 18:07:41 +0100 Subject: [PATCH] fix fzf on linux --- .chezmoitemplates/fzf-zsh_linux.tmpl | 12 +++--------- .chezmoitemplates/zshrc_linux.tmpl | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.chezmoitemplates/fzf-zsh_linux.tmpl b/.chezmoitemplates/fzf-zsh_linux.tmpl index d8a0331..4de2485 100644 --- a/.chezmoitemplates/fzf-zsh_linux.tmpl +++ b/.chezmoitemplates/fzf-zsh_linux.tmpl @@ -1,13 +1,7 @@ # Setup fzf # --------- -if [[ ! "$PATH" == */home/{{ .chezmoi.username }}/.fzf/bin* ]]; then - PATH="${PATH:+${PATH}:}/home/{{ .chezmoi.username }}/.fzf/bin" +if [[ ! "$PATH" == */root/.fzf/bin* ]]; then + PATH="${PATH:+${PATH}:}/root/.fzf/bin" fi -# Auto-completion -# --------------- -[[ $- == *i* ]] && source "/home/{{ .chezmoi.username }}/.fzf/shell/completion.bash" 2> /dev/null - -# Key bindings -# ------------ -source "/home/{{ .chezmoi.username }}/.fzf/shell/key-bindings.zsh" +source <(fzf --zsh) diff --git a/.chezmoitemplates/zshrc_linux.tmpl b/.chezmoitemplates/zshrc_linux.tmpl index 98230fb..fa13f40 100644 --- a/.chezmoitemplates/zshrc_linux.tmpl +++ b/.chezmoitemplates/zshrc_linux.tmpl @@ -112,7 +112,7 @@ export PATH=$PATH:/usr/local/go/bin source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -source ~/.fzf/shell/key-bindings.zsh +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh export EDITOR=vim