diff options
| author | Pierre Neidhardt <ambrevar@gmail.com> | 2016-12-24 09:23:07 +0530 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2016-12-24 12:53:07 +0900 |
| commit | c7b076400297e53b3fdb9bb0605b0c688a39fa40 (patch) | |
| tree | 2f9d04bf0d70317040ee3ed30019809e3e38186c /shell/key-bindings.bash | |
| parent | 847c512539f9909ae69a5067c1a64cb9bb485ea3 (diff) | |
| download | fzf-c7b076400297e53b3fdb9bb0605b0c688a39fa40.tar.gz | |
[shell] Use '-mindepth 1' to omit root folder in 'find' output (#779)
This removes the need for the 'sed' call. Faster, cleaner.
Diffstat (limited to 'shell/key-bindings.bash')
| -rw-r--r-- | shell/key-bindings.bash | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/key-bindings.bash b/shell/key-bindings.bash index d41eb5bd..8c3e6f77 100644 --- a/shell/key-bindings.bash +++ b/shell/key-bindings.bash @@ -1,10 +1,10 @@ # Key bindings # ------------ __fzf_select__() { - local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . \\( -path '*/\\.*' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ + local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ -o -type f -print \ -o -type d -print \ - -o -type l -print 2> /dev/null | sed 1d | cut -b3-"}" + -o -type l -print 2> /dev/null | cut -b3-"}" eval "$cmd | fzf -m $FZF_CTRL_T_OPTS" | while read -r item; do printf '%q ' "$item" done |
