Skip to content
Myr

[fish] Fix ctrl-r regression in versions <2.4 (#972)

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

Close #966

authored by Tom Fitzhenry · committed by Junegunn Choi · parent 940214a · Browse files · 1 file+14 added−2 removed
This commit

State

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

Diff stats

1 file+14 added−2 removed

  • other:+14 added−2 removed

1 file+14 added−2 removed

modified:shell/key-bindings.fish+14 added-2 removed
37 unmodified lines
38 function fzf-history-widget -d "Show command history"39 set -q FZF_TMUX_HEIGHT; or set FZF_TMUX_HEIGHT 40%40 begin41 set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT $FZF_DEFAULT_OPTS --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS +m"4243 set -l FISH_MAJOR (echo $FISH_VERSION | cut -f1 -d.)44 set -l FISH_MINOR (echo $FISH_VERSION | cut -f2 -d.)4546 # history's -z flag is needed for multi-line support.47 # history's -z flag was added in fish 2.4.0, so don't use it for versions48 # before 2.4.0.49 if [ "$FISH_MAJOR" -gt 2 -o \( "$FISH_MAJOR" -eq 2 -a "$FISH_MINOR" -ge 4 \) ];42 history -z | eval (__fzfcmd) --read0 -q '(commandline)' | perl -pe 'chomp if eof' | read -lz result43 and commandline -- $result50 history -z | eval (__fzfcmd) --read0 -q '(commandline)' | perl -pe 'chomp if eof' | read -lz result51 and commandline -- $result52 else53 history | eval (__fzfcmd) -q '(commandline)' | read -l result54 and commandline -- $result55 end56 end57 commandline -f repaint58 end59
87 unmodified lines