]> git.rmz.io Git - dotfiles.git/commitdiff
fzf: don't cross devices in cd-widget
authorSamir Benmendil <samir.benmendil@gmail.com>
Sun, 24 May 2015 16:37:51 +0000 (17:37 +0100)
committerSamir Benmendil <samir.benmendil@gmail.com>
Sun, 24 May 2015 16:48:15 +0000 (17:48 +0100)
zsh/lib/fzf.zsh

index fdeb0b858003d89fd9c65af9bac50877b1de75ac..6f0b81ff3062166f31451012be720cb6e490bc8b 100755 (executable)
@@ -47,7 +47,7 @@ bindkey '^T' fzf-file-widget
 
 # ALT-C - cd into the selected directory
 fzf-cd-widget() {
-  cd "${$(command find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
+  cd "${$(command find -L . -xdev \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
     -o -type d -print 2> /dev/null | sed 1d | cut -b3- | fzf +m):-.}"
   zle reset-prompt
 }