From c387689d1cd45f0d8eb122fe95ee72ccc61d3bff Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 3 Mar 2017 12:20:01 +0900 Subject: [shell] Enable sorting by default in CTRL-R CTRL-R binding used to start with --no-sort to list the matched commands in chronological order. However, it has been a constant source of confusion. Let's enable it by default from now on. The sorted result shouldn't be too confusing as we use --tiebreak=index. --- shell/key-bindings.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell/key-bindings.bash') diff --git a/shell/key-bindings.bash b/shell/key-bindings.bash index 5a68bc15..4266a407 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 +s --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 -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" -- cgit v1.2.3