zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
2.73k stars 122 forks source link

[bug]: Some of snippets don't load unless .zshrc source manually #656

Open omnigenous opened 1 month ago

omnigenous commented 1 month ago

What happened?

OMZP::man

^ Some OMZP snippets don't load automatically, OMZP::sudo plugin works fine

Steps to reproduce

  1. Open terminal
  2. Type any command, ex: horse
  3. ESC+man
  4. Result: horse an, expected result: man horse
  5. Source .zshrc manually source ${ZDOTDIR:-$HOME/.config/zsh}/.zshrc
  6. Steps 2-3
  7. Successfully get man horse

Relevant output

No response

Screenshots and recordings

https://github.com/zdharma-continuum/zinit/assets/154441415/6da8b339-4fe8-4237-9f91-98856aa0e2c9

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

xterm-kitty

If using WSL on Windows, which version of WSL

None

Additional context

# Set the directory we want to store zinit and plugins
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"

# Download Zinit, if it's not there yet
if [ ! -d "$ZINIT_HOME" ]; then
   mkdir -p "$(dirname $ZINIT_HOME)"
   git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
fi

# Source/Load zinit
source "${ZINIT_HOME}/zinit.zsh"

# Add in zsh plugins
zinit light zsh-users/zsh-syntax-highlighting
zinit light zsh-users/zsh-completions
zinit light zsh-users/zsh-autosuggestions
zinit light Aloxaf/fzf-tab

# Add in snippets
zinit snippet OMZP::sudo
zinit snippet OMZP::man
zinit snippet OMZP::command-not-found

Code of Conduct