1
0
mirror of https://github.com/balkian/dotfiles.git synced 2025-08-23 16:02:19 +00:00

add default completion zsh zfz

This commit is contained in:
J. Fernando Sánchez
2020-05-06 18:01:32 +02:00
parent bef862a0b1
commit 651fc3426e
3 changed files with 22 additions and 5 deletions

View File

@@ -15,6 +15,27 @@ if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
if [[ -s "/usr/share/fzf/key-bindings.zsh" ]]; then
source "/usr/share/fzf/key-bindings.zsh"
source "/usr/share/fzf/completion.zsh"
fi
# Change find to fd in fzf
if command -v fd > /dev/null 2>&1; then
_fzf_compgen_path() {
fd --hidden --follow --exclude ".git" . "$1"
}
# Use fd to generate the list for directory completion
_fzf_compgen_dir() {
fd --type d --hidden --follow --exclude ".git" . "$1"
}
fi
# Customize to your needs...
#
@@ -168,4 +189,4 @@ setopt interactivecomments
export WASMTIME_HOME="$HOME/.wasmtime"
export PATH="$WASMTIME_HOME/bin:$PATH"
export PATH="$WASMTIME_HOME/bin:$PATH"