Skip to content
Myr

[shell] Fix pruning condition of find command for CTRL-T and ALT-C

Before adoption: this commit came in with the history the project adopted, so no landing records it.

`-fstype dev` is invalid. It's devfs on macOS and devtmpfs on Linux.

authored by Junegunn Choi · committed by Junegunn Choi · parent 2e8814b · Browse files · 3 files+6 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+6 added−6 removed

  • other:+6 added−6 removed

3 files+6 added−6 removed

modified:shell/key-bindings.bash+2 added-2 removed
modified:shell/key-bindings.fish+2 added-2 removed
13 unmodified lines
14 end1516 function fzf-file-widget17 set -q FZF_CTRL_T_COMMAND; or set -l FZF_CTRL_T_COMMAND "18 command find -L . \\( -path '*/\\.*' -o -fstype 'dev' -o -fstype 'proc' \\) -prune \18 command find -L . \\( -path '*/\\.*' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \19 -o -type f -print \20 -o -type d -print \21 -o -type l -print 2> /dev/null | sed 1d | cut -b3-"22 eval "$FZF_CTRL_T_COMMAND | "(__fzfcmd)" -m $FZF_CTRL_T_OPTS > $TMPDIR/fzf.result"
10 unmodified lines
33 end3435 function fzf-cd-widget36 set -q FZF_ALT_C_COMMAND; or set -l FZF_ALT_C_COMMAND "37 command find -L . \\( -path '*/\\.*' -o -fstype 'dev' -o -fstype 'proc' \\) -prune \37 command find -L . \\( -path '*/\\.*' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \38 -o -type d -print 2> /dev/null | sed 1d | cut -b3-"39 # Fish hangs if the command before pipe redirects (2> /dev/null)40 eval "$FZF_ALT_C_COMMAND | "(__fzfcmd)" +m $FZF_ALT_C_OPTS > $TMPDIR/fzf.result"41 [ (cat $TMPDIR/fzf.result | wc -l) -gt 0 ]
30 unmodified lines
modified:shell/key-bindings.zsh+2 added-2 removed