zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
2.89k stars 125 forks source link

[bug]: shift count must be <= $# #463

Closed king-11 closed 1 year ago

king-11 commented 1 year ago

What happened?

on shell start i get a lot of such errors

compinit:527: no such file or directory: /home/king-11/.local/share/zinit/completions/_android
compinit:527: no such file or directory: /home/king-11/.local/share/zinit/completions/_archlinux-java
compinit:527: no such file or directory: /home/king-11/.local/share/zinit/completions/_artisan
compinit:527: no such file or directory: /home/king-11/.local/share/zinit/completions/_atach
compinit:shift:529: shift count must be <= $#
compinit:527: no such file or directory: /home/king-11/.local/share/zinit/completions/_bitcoin-cli
...

Steps to reproduce

Start the shell with latest zinit version in fedora linux

Relevant output

No response

Screenshots and recordings

image

Operating System & Version

OS: linux-gnu | Vendor: redhat | Machine: x86_64 | CPU: x86_64 | Processor: x86_64 | Hardware: x86_64

Zsh version

zsh 5.9 (x86_64-redhat-linux-gnu)

Terminal emulator

xterm-256color

If using WSL on Windows, which version of WSL

None

Additional context

No response

Code of Conduct

vladdoster commented 1 year ago

@king-11,

A few questions:

  1. Did you recently change something in your config?
  2. What is the output of the following command:
    zinit version
king-11 commented 1 year ago

The config is as follows:

zinit ice wait blockf lucid
zinit light rupa/z

# z tab completion
zinit ice wait lucid
zinit light changyuheng/fz

# z / fzf (ctrl-g)
zinit ice wait lucid
zinit light andrewferrier/fzf-z

# cd
zinit ice wait lucid
zinit light changyuheng/zsh-interactive-cd

# Don't bind these keys until ready
bindkey -r '^[[A'
bindkey -r '^[[B'
function __bind_history_keys() {
  bindkey '^[[A' history-substring-search-up
  bindkey '^[[B' history-substring-search-down
}
# History substring searching
zinit ice wait lucid atload'__bind_history_keys'
zinit light zsh-users/zsh-history-substring-search

# autosuggestions, trigger precmd hook upon load
zinit ice wait lucid atload'_zsh_autosuggest_start'
zinit light zsh-users/zsh-autosuggestions
export ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=10

# Tab completions
zinit ice wait lucid blockf atpull'zinit creinstall -q .'
zinit light zsh-users/zsh-completions

# Syntax highlighting
zinit ice wait lucid atinit'zpcompinit; zpcdreplay'
zinit light zdharma/fast-syntax-highlighting

zinit snippet OMZP::colored-man-pages
zinit light spaceship-prompt/spaceship-prompt

Version

zinit v3.9.0-13-g515688bc (linux-gnu_x86_64)
crai0 commented 1 year ago

@king-11 I was able to remove the dangling completions using zinit cclear which fixed the errors. If completions are missing afterwards try running zinit creinstall zsh-users/zsh-completions.

vladdoster commented 1 year ago

@crai0,

This issue should not happen anymore due to a recent patch.

psprint commented 1 year ago

Remember: zinit cclear any time there are such errors

sob., 15 kwi 2023, 20:09 użytkownik vladislav doster < @.***> napisał:

@crai0 https://github.com/crai0,

This issue should not happen anymore due to a recent patch.

— Reply to this email directly, view it on GitHub https://github.com/zdharma-continuum/zinit/issues/463#issuecomment-1509917741, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOE4CBXGZT2IDJD6ELXKNDXBLP7FANCNFSM6AAAAAAT3NJJ3U . You are receiving this because you are subscribed to this thread.Message ID: @.***>

king-11 commented 1 year ago

Thanks @crai0 @psprint this did for me I ran both

zinit cclear
zinit creinstall zsh-users/zsh-completions
vladdoster commented 1 year ago

Locking issue due to reported issue has been resolved.

Open a new issue and reference this issue if the problem persists.