zsh-autocomplete: Slight incompatibility with powerlevel10k theme
Environment
zsh-autocomplete
version: d728cf566bd0aba01b0a3937c781bbcb055b1bd0- 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?
- 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?
Steps to reproduce
- Use zsh-autocomplete along with powerlevel10k
- Try some command like git or even cat
Actual behavior
error/some warning
Only when launched using history function in zsh-autocomplete by pressing ↑
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 44 (11 by maintainers)
Commits related to this issue
- Prevent killing the wrong file descriptors Fixes issue #166. — committed to marlonrichert/zsh-autocomplete by marlonrichert 3 years ago
Thanks for digging in to this, Roman! 🎉 This was a low-level issue, and I’m sure it took some time to get up to speed so you could debug unfamiliar code. It is appreciated by the users of your excellent prompt framework.
@ShrirajHegde @tekhnee This is a problem in P10k’s
_p9k_deschedule_redraw()
function. It tries to uninstall an fd handler, without checking whether it’s still installed, and tries to close an fd, without checking if it’s still open. Please open an issue there.Without the anonymous functions the code snipped I’ve posted earlier wouldn’t work. More specifically,
fd
andpid
wouldn’t be set to zero by.autocomplete.async.kill
.Faster and cleaner. I’m not attached to this code.