From 033afde3b5d07eecce619bec06258fe15babebcb Mon Sep 17 00:00:00 2001 From: Chaoren Lin Date: Thu, 10 Dec 2015 19:14:22 -0800 Subject: [PATCH] Fix CTRL-T in tmux with non-standard configuration. - Don't assume ~/.fzf.bash exists. - Source the current script for __fzf_select__. - Forward $PATH. --- shell/key-bindings.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/key-bindings.bash b/shell/key-bindings.bash index e9bea78..2406850 100644 --- a/shell/key-bindings.bash +++ b/shell/key-bindings.bash @@ -25,7 +25,7 @@ __fzf_select_tmux__() { else height="-l $height" fi - tmux split-window $height "cd $(printf %q "$PWD"); FZF_CTRL_T_COMMAND=$(printf %q "$FZF_CTRL_T_COMMAND") bash -c 'source ~/.fzf.bash; tmux send-keys -t $TMUX_PANE \"\$(__fzf_select__)\"'" + tmux split-window $height "cd $(printf %q "$PWD"); PATH=$(printf %q "$PATH") FZF_CTRL_T_COMMAND=$(printf %q "$FZF_CTRL_T_COMMAND") bash -c 'source \"${BASH_SOURCE[0]}\"; tmux send-keys -t $TMUX_PANE \"\$(__fzf_select__)\"'" } __fzf_cd__() {