diff options
author | Daniel Schaffrath <dsh2@me.com> | 2017-10-20 05:56:02 +0200 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-10-20 12:56:02 +0900 |
commit | 3af63bcf1f203c9716a3f69e1264b8877e528941 (patch) | |
tree | bd913991b64017b9a7887a686c7c5fc3598c8a78 /shell | |
parent | 80a21f7a75d4b95a36c5743624c2ee25d329b2d9 (diff) |
[zsh] Use fc -r instead of fzf --tac to speed up loadtime (#1097)
Reference: http://zsh.sourceforge.net/Doc/Release/Shell-Builtin-Commands.html
> The flag -r reverses the order of the events
Diffstat (limited to 'shell')
-rw-r--r-- | shell/key-bindings.zsh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh index 7064611b..aabe53ab 100644 --- a/shell/key-bindings.zsh +++ b/shell/key-bindings.zsh @@ -59,8 +59,8 @@ bindkey '\ec' fzf-cd-widget fzf-history-widget() { local selected num setopt localoptions noglobsubst noposixbuiltins pipefail 2> /dev/null - selected=( $(fc -l 1 | - 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=${(qqq)LBUFFER} +m" $(__fzfcmd)) ) + selected=( $(fc -rl 1 | + FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m" $(__fzfcmd)) ) local ret=$? if [ -n "$selected" ]; then num=$selected[1] |