Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Loading completion with wait doesn't work #634

Open
1 task done
kuator opened this issue Jan 26, 2024 · 0 comments
Open
1 task done

[bug]: Loading completion with wait doesn't work #634

kuator opened this issue Jan 26, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@kuator
Copy link

kuator commented Jan 26, 2024

What happened?

I'm trying to load zsh-completions using wait.

Steps to reproduce

### Added by Zinit's installer
ZINIT_DIR="$XDG_DATA_HOME/zinit"
ZINIT_HOME="$ZINIT_DIR/zinit.git"
if [[ ! -f $ZINIT_HOME/zinit.zsh ]]; then
    print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
    command mkdir -p "$ZINIT_DIR" && command chmod g-rwX "$ZINIT_DIR"
    command git clone https://github.com/zdharma-continuum/zinit "$ZINIT_HOME" && \
        print -P "%F{33} %F{34}Installation successful.%f%b" || \
        print -P "%F{160} The clone has failed.%f%b"
fi

source "$ZINIT_HOME/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
### End of Zinit's installer chunk

# zsh-users/zsh-completions
# zinit light zsh-users/zsh-completions
zinit wait lucid light-mode for \
  as'completion' \
  atdelete'zinit cuninstall completions' \
  atload"zicompinit; zicdreplay" \
  atpull'zinit creinstall -q "$PWD"' \
  blockf \
  id-as'auto' \
  @zsh-users/zsh-completions

Completion doesn't work. But if I manually call compinit, then it does work.
Peek 2024-01-26 15-51
The completion also starts to work, If I remove the wait modifier:

zinit lucid light-mode for \
  as'completion' \
  atdelete'zinit cuninstall completions' \
  atload"zicompinit; zicdreplay" \
  atpull'zinit creinstall -q "$PWD"' \
  blockf \
  id-as'auto' \
  @zsh-users/zsh-completions

The problem is it's very slow now:

$ time zsh -i -c exit             
zsh -i -c exit  0,44s user 0,18s system 100% cpu 0,618 total

Relevant output

No response

Screenshots and recordings

No response

Operating System & Version

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

Zsh version

zsh 5.8.1 (x86_64-ubuntu-linux-gnu)

Terminal emulator

xterm-256color

If using WSL on Windows, which version of WSL

None

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@kuator kuator added the bug Something isn't working label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants