add fzf support for linux and darwin

This commit is contained in:
Rieger, Simon 2023-08-28 11:56:52 +02:00
parent ccc537c0d3
commit 690a65629d
6 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,13 @@
# Setup fzf
# ---------
if [[ ! "$PATH" == */home/{{ .chezmoi.username }}/.fzf/bin* ]]; then
PATH="${PATH:+${PATH}:}/home/{{ .chezmoi.username }}/.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.bash"

View file

@ -0,0 +1,13 @@
# Setup fzf
# ---------
if [[ ! "$PATH" == */home/{{ .chezmoi.username }}/.fzf/bin* ]]; then
PATH="${PATH:+${PATH}:}/home/{{ .chezmoi.username }}/.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"

5
dot_fzf.bash.tmpl Normal file
View file

@ -0,0 +1,5 @@
{{- if eq .chezmoi.os "darwin" -}}
{{- template "fzf-bash_darwin.tmpl" . -}}
{{- else if eq .chezmoi.os "linux" -}}
{{- template "fzf-bash_linux.tmpl" . -}}
{{- end -}}

5
dot_fzf.zsh.tmpl Normal file
View file

@ -0,0 +1,5 @@
{{- if eq .chezmoi.os "darwin" -}}
{{- template "fzf-zsh_darwin.tmpl" . -}}
{{- else if eq .chezmoi.os "linux" -}}
{{- template "fzf-zsh_linux.tmpl" . -}}
{{- end -}}