From: Samir Benmendil Date: Sun, 24 May 2015 16:37:51 +0000 (+0100) Subject: fzf: don't cross devices in cd-widget X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/5976e7c754210395c6854ff3504e75f352980d3c fzf: don't cross devices in cd-widget --- diff --git a/zsh/lib/fzf.zsh b/zsh/lib/fzf.zsh index fdeb0b8..6f0b81f 100755 --- a/zsh/lib/fzf.zsh +++ b/zsh/lib/fzf.zsh @@ -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 }