summaryrefslogtreecommitdiff
path: root/shell/key-bindings.zsh
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2016-06-12 20:37:17 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2016-06-12 20:48:23 +0900
commitc39c039e155c50bcf8fecc5956c4bdd3b5c6bea1 (patch)
tree8e1ab125ec5ee5517cb2996d19cf269e22c66845 /shell/key-bindings.zsh
parent07f176f426140fe297a79e4fba9f048e72c865f0 (diff)
downloadfzf-c39c039e155c50bcf8fecc5956c4bdd3b5c6bea1.tar.gz
[shell] Add $FZF_CTRL_T_OPTS and $FZF_ALT_C_OPTS
Close #596
Diffstat (limited to 'shell/key-bindings.zsh')
-rw-r--r--shell/key-bindings.zsh4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh
index f77e7ec3..35e5f194 100644
--- a/shell/key-bindings.zsh
+++ b/shell/key-bindings.zsh
@@ -8,7 +8,7 @@ __fsel() {
-o -type f -print \
-o -type d -print \
-o -type l -print 2> /dev/null | sed 1d | cut -b3-"}"
- eval "$cmd" | $(__fzfcmd) -m | while read item; do
+ eval "$cmd | $(__fzfcmd) -m $FZF_CTRL_T_OPTS" | while read item; do
echo -n "${(q)item} "
done
echo
@@ -29,7 +29,7 @@ bindkey '^T' fzf-file-widget
fzf-cd-widget() {
local cmd="${FZF_ALT_C_COMMAND:-"command find -L . \\( -path '*/\\.*' -o -fstype 'dev' -o -fstype 'proc' \\) -prune \
-o -type d -print 2> /dev/null | sed 1d | cut -b3-"}"
- cd "${$(eval "$cmd" | $(__fzfcmd) +m):-.}"
+ cd "${$(eval "$cmd | $(__fzfcmd) +m $FZF_ALT_C_OPTS"):-.}"
zle reset-prompt
}
zle -N fzf-cd-widget