zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
2.77k stars 123 forks source link

[bug]: _autocomplete.command:local:2: bad option: -P #510

Closed misumisumi closed 1 year ago

misumisumi commented 1 year ago

What happened?

I type a partial command and hit tab. Autocomplete works but I get the error message: _autocomplete.command:local:2: bad option: -P after use zinit update -a. I read #364 and tried to fix it, but couldn't resolve it.

For example: image

Steps to reproduce

  1. Use this config, return bad option
    
    autoload -Uz compinit && compinit
    typeset -U path cdpath fpath manpath

declare -A ZINIT ZINIT_HOME=/home/sumi/.zinit ZINIT[HOME_DIR]=${ZINIT_HOME} [[ -r ${ZINIT_HOME} ]] || mkdir -p ${ZINIT_HOME} source "/nix/store/si4jh243d29ahifa488wnqq708jjc240-zinit-3.10.0/share/zinit/zinit.zsh"

zinit for \ PZTM::completion

2. Use this config, not return `bad option`

autoload -Uz compinit && compinit typeset -U path cdpath fpath manpath

declare -A ZINIT ZINIT_HOME=/home/sumi/.zinit ZINIT[HOME_DIR]=${ZINIT_HOME} [[ -r ${ZINIT_HOME} ]] || mkdir -p ${ZINIT_HOME} source "/nix/store/si4jh243d29ahifa488wnqq708jjc240-zinit-3.10.0/share/zinit/zinit.zsh"


### Relevant output

```shell
No response.

Screenshots and recordings

No response

Operating System & Version

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

Zsh version

zsh 5.9 (x86_64-pc-linux-gnu)

Terminal emulator

wezterm

If using WSL on Windows, which version of WSL

None

Additional context

I use NixOS.

Code of Conduct

misumisumi commented 1 year ago

I'm sorry I am closing this because I could not reproduce it on my other machine.