summaryrefslogtreecommitdiff
path: root/shell/key-bindings.bash
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-03-03 12:20:01 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-03-03 12:20:01 +0900
commitc387689d1cd45f0d8eb122fe95ee72ccc61d3bff (patch)
treef5b8064272d8f91bb0c498c0ae4be854440a8b6b /shell/key-bindings.bash
parentcb9238dc4ee6ee8c9d25fa0c1f6d731b379de9b1 (diff)
downloadfzf-c387689d1cd45f0d8eb122fe95ee72ccc61d3bff.tar.gz
[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.
Diffstat (limited to 'shell/key-bindings.bash')
-rw-r--r--shell/key-bindings.bash2
1 files changed, 1 insertions, 1 deletions
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"