zsh-autocomplete: Mismatched history due to history picked from $HISTFILE

Environment

  • zsh-autocomplete version: 1f59fc6ec81a589dd744800fc5d92d371da5fc09
  • Zsh version: zsh-5.8-0-g77d203f
  • Framework: none
  • Plugin manager: none
  • ~/.zshrc file: https://pastebin.com/6E0pP4MJ

Please test if the bug occurs without config files:

$ cd $(mktemp -d)  # Create a temp dir and enter it.
$ ZDOTDIR=$PWD HOME=$PWD zsh -f  # Start a subshell in it without config files.
% source path/to/zsh-autocomplete.plugin.zsh  # Source the plugin.
% # Insert here the steps you take to reproduce your bug.

Does the bug occur without config files?

  • Not sure

If not, gradually add lines from your config file to the subshell until the bug appears.

Steps to reproduce

  1. Vanilla zsh with p10k theme,zsh-syntaxhighting,zsh-autosuggestions,zsh-autocomplete

Actual behavior

Wrong history gets selected and executed

Expected behavior

Right history gets selected and executed

Screenshot from 2021-01-10 21-14-34 Screenshot from 2021-01-10 21-14-36 Screenshot from 2021-01-10 21-14-39 Screenshot from 2021-01-10 21-14-42

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 31 (13 by maintainers)

Commits related to this issue

Most upvoted comments

All good for me !!! Thanks a lot 😉

Ok, figured it out, there’s a lot of conflict with zsh autocomplete. Disabling zsh autocomplete makes zsh write history to $HISTFILE immediately after command execution which fixes the issue

I am not 100% sure since yesterday the problem happened.

Ok I miswrote here, I meant zsh-autosuggestions not autocomplete