diff options
author | Martin Polden <mpolden@mpolden.no> | 2020-12-05 13:48:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-05 21:48:54 +0900 |
commit | b62a74b3156540cea4f12cf1d092cba77cb1db67 (patch) | |
tree | dd6ae3cc442a12bf9ff72da207aa0b114178d979 /shell | |
parent | 2ec382ae0eda85f89a4b977aa39425fb7e710df1 (diff) |
[zsh] Reload shared history before searching (#2251)
Diffstat (limited to 'shell')
-rw-r--r-- | shell/key-bindings.zsh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh index b55c4f4f..4755c58d 100644 --- a/shell/key-bindings.zsh +++ b/shell/key-bindings.zsh @@ -107,6 +107,7 @@ bindkey '\ec' fzf-cd-widget fzf-history-widget() { local selected num setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases 2> /dev/null + [[ -o sharehistory ]] && fc -RI selected=( $(fc -rl 1 | perl -ne 'print if !$seen{(/^\s*[0-9]+\**\s+(.*)/, $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=$? |