summary refs log tree commit diff stats
path: root/tag-zsh
diff options
context:
space:
mode:
Diffstat (limited to 'tag-zsh')
-rw-r--r--tag-zsh/config/zsh/zshrc19
1 files changed, 18 insertions, 1 deletions
diff --git a/tag-zsh/config/zsh/zshrc b/tag-zsh/config/zsh/zshrc
index 80068eb5..86f1b54d 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] ]]