add fzf support for linux and darwin
This commit is contained in:
parent
ccc537c0d3
commit
690a65629d
6 changed files with 36 additions and 0 deletions
13
.chezmoitemplates/fzf-bash_linux.tmpl
Normal file
13
.chezmoitemplates/fzf-bash_linux.tmpl
Normal 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"
|
13
.chezmoitemplates/fzf-zsh_linux.tmpl
Normal file
13
.chezmoitemplates/fzf-zsh_linux.tmpl
Normal 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
5
dot_fzf.bash.tmpl
Normal 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
5
dot_fzf.zsh.tmpl
Normal 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 -}}
|
Loading…
Reference in a new issue