beets: zsh completion cache is broken
Problem
The zsh completion is broken. After zsh loads the cached functions you give the following error when try to complete (beet <tab>
).
_beet:4: command not found: _ra_comp
_beet:4: command not found: _ra_comp
_beet:4: command not found: _ra_comp
_beet:4: command not found: _ra_comp
_beet:4: command not found: _ra_comp
_beet:4: command not found: _ra_comp
_beet:4: command not found: _ra_comp
_beet:4: command not found: _ra_comp
(repeat several times)
My zshrc file is very simple.
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/ogarcia/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
The problem is introduced in this commit: https://github.com/beetbox/beets/commit/5282d2882eb9cd4cb7e9d9370256c599575bcaee
About this issue
- Original URL
- State: open
- Created 8 years ago
- Reactions: 1
- Comments: 43 (3 by maintainers)
Commits related to this issue
- Roll back zsh completion to 9dc7995 See #2266. The recently introduced caching mechanism is nifty, but it's causing problems for many users. We're rolling it back until the author can get to the bott... — committed to beetbox/beets by sampsyo 8 years ago
- Changelog note about #2266 — committed to beetbox/beets by sampsyo 8 years ago
The problem is that there is no function to add to a cache file; you can only (re)create the whole thing in one go, which means that if you want to do incremental caching it makes more sense to have separate cache files. If someone could write an _append_cache function (e.g. by making some adjustments to _store_cache) that would be really useful… fancy trying it? Another problem with my solution is that it pollutes the environment with lots of variables (with names starting
beets_
). Unfortunately this is unavoidable when using zsh completion caches since the variables are made global when retrieved from the cache.OK, I’ve now fixed
_beet
to use the proper zsh caching functions_store_cache
,_retrieve_cache
and_cach_invalid
: https://github.com/beetbox/beets/commit/209d281871e7d86bf60729f2ca25e60b0aaa0e2b Let me know if you still have problems.Yeap, switching to the previous did the trick.
Thanks @ogarcia ✨
@Jucgshu the best way is simply remove the completion file:
Other option is use an old version before cache “patch”.
@vapniks any news about this?