From b08f6fb6ee6592db030f3f72d97ef291d1ce2d4c Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 17 Jan 2017 15:42:02 +0100 Subject: Fix fzf completion --- tag-zsh/config/zsh/zshrc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'tag-zsh') diff --git a/tag-zsh/config/zsh/zshrc b/tag-zsh/config/zsh/zshrc index 80068eb..86f1b54 100644 --- a/tag-zsh/config/zsh/zshrc +++ b/tag-zsh/config/zsh/zshrc @@ -5,7 +5,7 @@ zplug "zsh-users/zsh-completions", depth:1, defer:0 zplug "Tarrasch/zsh-autoenv", as:plugin zplug "clvv/fasd", hook-build:"PREFIX=$HOME make install" zplug "junegunn/fzf-bin", from:gh-r, as:command, rename-to:fzf -zplug "junegunn/fzf", as:plugin, use:"shell/*.zsh" +zplug "junegunn/fzf", as:plugin, use:"shell/*.zsh", defer:2 zplug "junegunn/fzf", as:command, use:"bin/*" zplug "caarlos0/zsh-open-pr", as:plugin if [[ -n $commands[nix-env] ]] @@ -231,6 +231,23 @@ else precmd_functions+=(update_window_title) fi +if zplug check junegunn/fzf +then + _fzf_compgen_path() { + echo "$1" + command find -L "$1" \ + -name .git -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \ + -a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@' + } + + _fzf_compgen_dir() { + command find -L "$1" \ + -name .git -prune -o -name .svn -prune -o -type d \ + -a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@' + } +fi + + if zplug check clvv/fasd then if [[ -n $commands[fasd] ]] -- cgit 1.4.1