1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-11-05 05:01:43 +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

3
.gitmodules vendored
View File

@ -14,6 +14,3 @@
[submodule "zsh/.zprezto-contrib/fzf-z"]
path = zsh/.zprezto-contrib/fzf-z
url = git@github.com:andrewferrier/fzf-z.git
[submodule "zsh/.zprezto-contrib/fzf-tab"]
path = zsh/.zprezto-contrib/fzf-tab
url = https://github.com/Aloxaf/fzf-tab

@ -1 +0,0 @@
Subproject commit 607a28b8950a152e3e799799c45c1110d10e680f

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"