Skip to content

Commit

Permalink
Sync local history before doing history search
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonrichert committed Jun 20, 2021
1 parent ff42f83 commit 98f4418
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions module/.autocomplete.async
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ bindkey -s -M menuselect '^S' '^G^S'
else
typeset -gH curcontext=${WIDGET}:::
fi
[[ -o sharehistory ]] &&
fc -RI # Get new history events from file.
.autocomplete.async.start
}

Expand Down
4 changes: 3 additions & 1 deletion widget/.autocomplete.history-search.zle-widget
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ ${0}() {
LBUFFER="$lcontext"
RBUFFER="$rcontext"

zle _history_search; ret=$?
[[ -o sharehistory ]] &&
fc -RI # Get new history events from file.
zle _history_search

} always {
if [[ $BUFFER == $lcontext$rcontext ]] then
Expand Down

0 comments on commit 98f4418

Please sign in to comment.