Skip to content
Myr

Fix broken FZF_TMUX switch and update test cases (#203)

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

authored by Junegunn Choi · committed by Junegunn Choi · parent 318edc8 · Browse files · 3 files+26 added−12 removed
This commit

State

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

Diff stats

3 files+26 added−12 removed

  • other:+26 added−12 removed

3 files+26 added−12 removed

modified:shell/key-bindings.bash+6 added-2 removed
modified:shell/key-bindings.fish+13 added-7 removed
24 unmodified lines
25 end26 end2728 function __fzf_ctrl_t29 __fzf_list | fzf-tmux (__fzf_tmux_height) -m > $TMPDIR/fzf.result29 __fzf_list | eval (__fzfcmd) -m > $TMPDIR/fzf.result30 and commandline -i (cat $TMPDIR/fzf.result | __fzf_escape)31 commandline -f repaint32 rm -f $TMPDIR/fzf.result33 end3435 function __fzf_ctrl_r36 history | fzf-tmux (__fzf_tmux_height) +s +m --tiebreak=index --toggle-sort=ctrl-r > $TMPDIR/fzf.result36 history | eval (__fzfcmd) +s +m --tiebreak=index --toggle-sort=ctrl-r > $TMPDIR/fzf.result37 and commandline (cat $TMPDIR/fzf.result)38 commandline -f repaint39 rm -f $TMPDIR/fzf.result40 end4142 function __fzf_alt_c43 # Fish hangs if the command before pipe redirects (2> /dev/null)44 __fzf_list_dir | fzf-tmux (__fzf_tmux_height) +m > $TMPDIR/fzf.result44 __fzf_list_dir | eval (__fzfcmd) +m > $TMPDIR/fzf.result45 [ (cat $TMPDIR/fzf.result | wc -l) -gt 0 ]46 and cd (cat $TMPDIR/fzf.result)47 commandline -f repaint48 rm -f $TMPDIR/fzf.result49 end5051 function __fzf_tmux_height52 if set -q FZF_TMUX_HEIGHT53 echo "-d$FZF_TMUX_HEIGHT"51 function __fzfcmd52 set -q FZF_TMUX; or set FZF_TMUX 15354 if [ $FZF_TMUX -eq 1 ]55 if set -q FZF_TMUX_HEIGHT56 echo "fzf-tmux -d$FZF_TMUX_HEIGHT"57 else58 echo "fzf-tmux -d40%"59 end60 else55 echo "-d40%"61 echo "fzf"62 end63 end6465 bind \ct '__fzf_ctrl_t'
4 unmodified lines
modified:shell/key-bindings.zsh+7 added-3 removed