zsh-autocomplete: History menu doesn't insert completion when part of the word is typed (Oh-My-Zsh)
Environment
- Zsh version: 5.5.1
zsh-autocomplete
version: 0da3bdc1dd7c97a6afba53e922483a8be70acb4d- Latest Oh-My-Zsh (manually updated using
omz update
today, 16 Oct 2020)
Please report 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.
% # Try to reproduce your bug...
Does the bug occur without config files?
-
Yes
-
No
If not, gradually add lines from your config file to the subshell until the bug appears.
Which combination of config causes the bug to appear?
source /root/.oh-my-zsh/oh-my-zsh.sh
source /root/.oh-my-zsh/plugins/zsh-autocomplete/zsh-autocomplete.plugin.zsh
Steps to reproduce
- Let’s say I want to type
nano .zshrc
which I’ve entered before so it’s going to appear in history menu - I typed
na
and pressed arrow up - Select
nano .zshrc
and enter
Expected behavior
It should be saying nano .zshrc
in my terminal
Actual behavior
It goes back to na
If there’s nothing in the terminal (me without typing na
), it actually works.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 31 (15 by maintainers)
Commits related to this issue
- Remove incompatible completion setting from OMZ Fix issue #112. — committed to marlonrichert/zsh-autocomplete by marlonrichert 4 years ago
After creating a temp ZSH shell and just sourcing the
completion.zsh
andzsh-autocompelete
, the first command as well as the second command after the first commands work perfectly.@marlonrichert deleting
completion.zsh
in.oh-my-zsh/lib
fixed it apparently.Can you try the following?
.oh-my-zsh/lib
..oh-my-zsh/lib
:zsh-autocomplete
, as described above.Does deleting any of these files cause the problem to go away? If so, which one?
We should thank you for your time on this, very grateful about it much thanks.
Alright, it’s fixed now. Thanks for helping out!
Hi, I’m suffering from the same problem.
I copy
.oh-my-zsh/lib/completion.zsh
to a filetry
, comment some of the lines and run the following:If line 1-13 are left uncommented, the completion goes well. But if I uncomment line 14 further, the problem occurs, so I think it is the line 14 that causes the problem, which says
Great! That narrows it down a lot. I’ll see what I can do fix it.
@marlonrichert I’ve actually given up on oh-my-zsh as I found it’s undocumented “helpers” were more of a hindrance! I am not seeing this behaviour (I’m still on d7e7b05).