From 938151a834c1858ffdd6091cbcb42688a3784b6b Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 26 Jun 2015 01:00:58 +0900 Subject: [shell] Add FZF_CTRL_T_COMMAND for CTRL-T Close #40 --- shell/key-bindings.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'shell/key-bindings.zsh') diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh index 642a35e8..735aa501 100644 --- a/shell/key-bindings.zsh +++ b/shell/key-bindings.zsh @@ -4,10 +4,11 @@ if [[ $- =~ i ]]; then # CTRL-T - Paste the selected file path(s) into the command line __fsel() { - command find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \ + local cmd="${FZF_CTRL_T_COMMAND:-"command \\find -L . \\( -path '*/\\.*' -o -fstype 'dev' -o -fstype 'proc' \\) -prune \ -o -type f -print \ -o -type d -print \ - -o -type l -print 2> /dev/null | sed 1d | cut -b3- | $(__fzfcmd) -m | while read item; do + -o -type l -print 2> /dev/null | sed 1d | cut -b3-"}" + eval "$cmd" | $(__fzfcmd) -m | while read item; do printf '%q ' "$item" done echo -- cgit v1.2.3