zsh-autocomplete: `bad pattern: funcs=(\n ~zsh-autocomplete/functions/.autocomplete.*~*.zwc(N-.:a)\n )`
zsh-autocomplete
version: latest I assume- Zsh version: zsh 5.8 (x86_64-apple-darwin20.0)
- Framework: Starship
- Plugin manager: zinit
- Operating system: macOS ARM latest release
I was not able to reproduce it with the template you provided because I only get this error on loading the shell:
~/Development
;
(anon):22: bad pattern: funcs=(\n ~zsh-autocomplete/functions/.autocomplete.*~*.zwc(N-.:a)\n )
My zshrc:
eval "$(starship init zsh)"
export VOLTA_HOME="$HOME/.volta"
export PATH="$VOLTA_HOME/bin:$PATH"
alias vim="nvim"
alias dir="ls -lah"
alias zshrc="code ~/.zshrc"
# Globbing
setopt NO_CASE_GLOB
setopt EXTENDED_GLOB
# History
HISTORY_IGNORE="(ls|dir|cd|pwd|exit|cd ..|..|*venv*)"
setopt EXTENDED_HISTORY
setopt INC_APPEND_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_REDUCE_BLANKS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_IGNORE_DUPS
setopt HIST_FIND_NO_DUPS
setopt HIST_SAVE_NO_DUPS
# Misc
setopt AUTO_CD
setopt MENU_COMPLETE
setopt NO_LIST_AMBIGUOUS
# Settings
zstyle ':autocomplete:*' min-input 2
zstyle ':autocomplete:tab:*' fzf-completion yes
# Plugins
source "$HOME/.zinit/bin/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
zinit wait lucid light-mode for \
marlonrichert/zsh-autocomplete \
atinit"zicompinit; zicdreplay" \
zdharma/fast-syntax-highlighting \
blockf atpull'zinit creinstall -q .' \
zsh-users/zsh-completions
zinit ice from"gh-r" as"program" bpick"*arm*"
zinit light junegunn/fzf
My zsh_history looks like this:
: 1631085612:0;cd app
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 36 (16 by maintainers)
No, not correct. đ Znap does have lazy loading:
For example, hereâs how to set up lazy loading for
pyenv
,pip
,pipx
andpipenv
and their respective completion functions:This way, initialization code for these commands wonât run until you actually try to execute the command or try to invoke completion on it. đ
If you really want to go wild, you could even replace the
eval "$( <command> )"
statements in there withznap eval "<command>"
, but in my experience, thatâs not really necessary.Hmm. I just created a new user. And then I do:
That appears on each new shell I open. Autocomplete doesnât work at all (god damn I love your plugin so much it is a nightmare without). And it is a little worse because Powerlevel10k instant prompt reports tons of output because something is logging before the first prompt. Very annoying atm.
Okay wow you are amazing. Now I donât even see any blink or delay its just up in 0.1ms xD Combined it with Starship.rs and itâs just the perfect fit for it.
Iâm deeply honored that youâd ask, @marlonrichert! But I see us as doing two rather different things. I support Zsh as far back as 4.3.11, whereas you take advantage of the most cutting-edge features of the latest versions of the shell. It seems that we have different aims.
I originally used a subset of Zinitâs syntax, believe it or not! The whole point was to make my Zinit-based
.zshrc
work when I was using Zsh < 5.0.8. But when I decided to stop using Zinit and do my own thing, it seemed preferable to opt for a simpler, more Antigen-like syntax.I do admire your project very much. I think the one element that I very consciously copied (as acknowledged in the code and the documentation) was your idea of using dynamic named directories for the Git repos. It is a very elegant feature.
@agkozak I noticed that Z Comet is actually not that different in syntax from Znap and that you even copied some features from me. Rather than compete with each other, would you be interested in joining forces and merge our plugin managers into one?
For some reason I had to delete the local clone of the plugin my plugin manager did. In this exact example for my I had to delete
$XDG_CACHE_HOME/zinit/plugins/marlonrichert---zsh-autocomplete
. It then reinstalled it and then it was fine. TheHEAD
of the commit before I deleted the directory and afterwards was the same. Dunno what was the difference here. Maybe some âcompileâ hook or so? đ¤ˇđžOkay yes. But I first had to delete it. Dunno why. đ¤ˇđž Thank you!
Thank you so much!! đđž So nice to have my old full functional shell back. đ
Youâre very welcome. I was just working on a similar patch, but I was not sure how many instances of
private
needed to be changed. It looks as if youâve done a very thorough job.@marlonrichert Oh, I think you are right ^^ Did not think about that to be an issue with the pm rather than the plugin itself.
I didnât realize it before, but this issue is a duplicate of #339.
Also, 96fec14c2963d06412af82c9873c5ff64336a1a3 doesnât fix the problem you have; itâs a workaround for another Z Init problem. Apologies for the confusion.
@weilbith Itâs caused by a bug in Z Init: https://github.com/zdharma/zinit/issues/543. Itâs not that hard to fix, though. See my comment there for an explanation.
@jack1142 Looks like Z Comet has the same bug as Z Init. Again, see my comment on the Z Init issue for an explanation. When you open an issue on Z Cometâs repo, make sure you include a link to my comment.
And in case you didnât know it: I maintain a fast, lightweight & simple plugin manager called Znap, which naturally doesnât suffer from the same problem. đ
No, gone after updating, at least on my end.
Great to hear! đ
PS: If you enjoy using my software, please consider sponsoring me.
Itâs actually a bug in Zinit: https://github.com/zdharma/zinit/issues/366
I had a workaround for it, but it looks like it doesnât work anymore. I will add a new workaround.
However, I do strongly recommend you switch to a plugin manager that doesnât do as much nonsense.