diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/key-bindings.bash | 2 | ||||
-rw-r--r-- | shell/key-bindings.fish | 2 | ||||
-rw-r--r-- | shell/key-bindings.zsh | 2 |
3 files changed, 3 insertions, 3 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" diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish index c35dac7e..e424f1a1 100644 --- a/shell/key-bindings.fish +++ b/shell/key-bindings.fish @@ -45,7 +45,7 @@ function fzf_key_bindings function fzf-history-widget -d "Show command history" set -q FZF_TMUX_HEIGHT; or set FZF_TMUX_HEIGHT 40% begin - set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT $FZF_DEFAULT_OPTS +s --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS +m" + set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT $FZF_DEFAULT_OPTS --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS +m" history | eval (__fzfcmd) -q '(commandline)' | read -l result and commandline -- $result end diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh index dbafafb2..e67e3a78 100644 --- a/shell/key-bindings.zsh +++ b/shell/key-bindings.zsh @@ -63,7 +63,7 @@ fzf-history-widget() { setopt pipefail 2> /dev/null local selected num selected=( $(fc -l 1 | - 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 --query=${(q)LBUFFER} +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 --query=${(q)LBUFFER} +m" $(__fzfcmd)) ) local ret=$? if [ -n "$selected" ]; then num=$selected[1] |