summaryrefslogtreecommitdiff
path: root/shell/key-bindings.zsh
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-06-26 01:00:58 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-06-26 01:02:44 +0900
commit938151a834c1858ffdd6091cbcb42688a3784b6b (patch)
tree6ffbb24708486b37fd92210b830accd1e1ead9d2 /shell/key-bindings.zsh
parent14e3b84073215e29f90f10e6ccce35704598e51d (diff)
downloadfzf-938151a834c1858ffdd6091cbcb42688a3784b6b.tar.gz
[shell] Add FZF_CTRL_T_COMMAND for CTRL-T
Close #40
Diffstat (limited to 'shell/key-bindings.zsh')
-rw-r--r--shell/key-bindings.zsh5
1 files changed, 3 insertions, 2 deletions
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