From 89de1340af8fa1bf767d4dfbc8696700d58d95d2 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 25 Apr 2018 18:47:56 +0900 Subject: [PATCH] [bash] Add --sync to the default CTRL-R options This compensates the use of --tac. fzf will not render on the screen until the complete list of commands are loaded. --- 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 29c5c96..be24dec 100644 --- a/shell/key-bindings.bash +++ b/shell/key-bindings.bash @@ -56,7 +56,7 @@ __fzf_history__() ( shopt -u nocaseglob nocasematch line=$( HISTTIMEFORMAT= history | - FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS --tac -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS +m" $(__fzfcmd) | + FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS --tac --sync -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS +m" $(__fzfcmd) | command grep '^ *[0-9]') && if [[ $- =~ H ]]; then sed 's/^ *\([0-9]*\)\** .*/!\1/' <<< "$line"