Skip to content
Myr

Make sure to start tmux pane from the current directory (#143)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

- fzf-tmux - CTRL-T of bash/zsh/fish - fish implementation may not work if the path contains double-quote characters (FIXME)

authored by Junegunn Choi · committed by Junegunn Choi · parent 4977174 · Browse files · 4 files+5 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+5 added−4 removed

  • other:+5 added−4 removed

4 files+5 added−4 removed

modified:bin/fzf-tmux+1 added-1 removed
113 unmodified lines
114mkfifo $fifo2115mkfifo $fifo3116if [ -n "$term" -o -t 0 ]; then117 tmux set-window-option -q synchronize-panes off \;\118 split-window $opt "$envs"' sh -c "'$fzf' '"$fzf_args"' > '$fifo2'; echo \$? > '$fifo3' '"$close"'"' $swap118 split-window $opt "cd $(printf %q "$PWD");$envs"' sh -c "'$fzf' '"$fzf_args"' > '$fifo2'; echo \$? > '$fifo3' '"$close"'"' $swap119else120 mkfifo $fifo1121 tmux set-window-option -q synchronize-panes off \;\122 split-window $opt "$envs"' sh -c "'$fzf' '"$fzf_args"' < '$fifo1' > '$fifo2'; echo \$? > '$fifo3' '"$close"'"' $swap
5 unmodified lines
modified:shell/key-bindings.bash+1 added-1 removed
modified:shell/key-bindings.fish+2 added-1 removed
25 unmodified lines
26 end2728 function __fzf_ctrl_t29 if [ -n "$TMUX_PANE" -a "$FZF_TMUX" != "0" ]30 # FIXME need to handle directory with double-quotes30 tmux split-window (__fzf_tmux_height) "fish -c 'fzf_key_bindings; __fzf_ctrl_t_tmux \\$TMUX_PANE'"31 tmux split-window (__fzf_tmux_height) "cd \"$PWD\";fish -c 'fzf_key_bindings; __fzf_ctrl_t_tmux \\$TMUX_PANE'"32 else33 __fzf_list | fzf -m > $TMPDIR/fzf.result34 and commandline -i (cat $TMPDIR/fzf.result | __fzf_escape)35 commandline -f repaint
45 unmodified lines
modified:shell/key-bindings.zsh+1 added-1 removed