X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/82d7392c5ca2632efc17169b5e97852c282ec6b2..e8ae4a469b8b5db19a27a2bf71bb04142a68a6f0:/zsh/lib/fzf.zsh?ds=sidebyside diff --git a/zsh/lib/fzf.zsh b/zsh/lib/fzf.zsh index fdeb0b8..b9188d6 100755 --- a/zsh/lib/fzf.zsh +++ b/zsh/lib/fzf.zsh @@ -1,4 +1,4 @@ -if [[ ! -x /usr/bin/fzf ]]; then +if ! hash fzf 2>/dev/null; then echo '`fzf` is not installed.' return fi @@ -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 }