From 77d45cb17372045fb52e9d32562349d3fa083117 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 1 Apr 2014 20:47:56 +0900 Subject: [PATCH] Avoid starting interactive bash (#34) --- install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install b/install index 48808dd..2b3c0cb 100755 --- a/install +++ b/install @@ -89,7 +89,7 @@ export -f fzf > /dev/null # Auto-completion # --------------- -$fzf_completion +[[ \$- =~ i ]] && $fzf_completion EOF @@ -98,8 +98,6 @@ EOF cat >> $src << "EOFZF" # Key bindings # ------------ -if [[ $- =~ i ]]; then - __fsel() { find * -path '*/\.*' -prune \ -o -type f -print \ @@ -110,6 +108,8 @@ __fsel() { echo } +if [[ $- =~ i ]]; then + __fsel_tmux() { local height height=${FZF_TMUX_HEIGHT:-40%} @@ -118,7 +118,7 @@ __fsel_tmux() { else height="-l $height" fi - tmux split-window $height "bash -ci 'source ~/.fzf.bash; tmux send-keys -t $TMUX_PANE \"\$(__fsel)\"'" + tmux split-window $height "bash -c 'source ~/.fzf.bash; tmux send-keys -t $TMUX_PANE \"\$(__fsel)\"'" } __fcd() {