Skip to content
Myr

[fish] CTRL-R: Make loading non-blocking

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 ed8ceec · Browse files · 1 file+4 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+4 added−2 removed

  • other:+4 added−2 removed

1 file+4 added−2 removed

modified:shell/key-bindings.fish+4 added-2 removed
68 unmodified lines
69 if test "$FISH_MAJOR" -gt 2 -o \( "$FISH_MAJOR" -eq 2 -a "$FISH_MINOR" -ge 4 \)70 set -lx FZF_DEFAULT_OPTS (__fzf_defaults "" "-n2..,.. --scheme=history --bind=ctrl-r:toggle-sort --wrap-sign '"\t"↳ ' --highlight-line $FZF_CTRL_R_OPTS +m")71 set -lx FZF_DEFAULT_OPTS_FILE ''72 if type -q perl73 set -l fzf_command (__fzfcmd) --tac --read0 --print0 -q (commandline)73 builtin history -z --reverse | command perl -0 -pe 's/^/$.\t/g; s/\n/\n\t/gm' | eval (__fzfcmd) --tac --read0 --print0 -q '(commandline)' | string replace -r '^\d*\t' '' | read -lz result74 builtin history -z --reverse | command perl -0 -pe 's/^/$.\t/g; s/\n/\n\t/gm' | $fzf_command | string replace -r '^\d*\t' '' | read -lz result75 and commandline -- $result76 else77 set -l h (builtin history -z | string split0)78 set -l fzf_command (__fzfcmd) --read0 --print0 -q (commandline)79 for i in (seq (count $h) -1 1)80 string join0 -- $i\t(string replace -a -- \n \n\t $h[$i] | string collect)79 end | eval (__fzfcmd) --read0 --print0 -q '(commandline)' | string replace -r '^\d*\t' '' | read -lz result81 end | $fzf_command | string replace -r '^\d*\t' '' | read -lz result82 and commandline -- $result83 end84 else85 builtin history | eval (__fzfcmd) -q '(commandline)' | read -l result
122 unmodified lines