zdharma-continuum / zinit

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

[bug]: OMZP::aliases not functional #571

Closed mefengl closed 10 months ago

mefengl commented 10 months ago

What happened?

When I run als git, I got:

/Users/xx/.pyenv/versions/3.10.10/bin/python3: can't open file '/Users/xx/.local/share/zinit/snippets/OMZP::aliases/cheatsheet.py': [Errno 2] No such file or directory

It should show the git's aliases, as in oh-my-zsh.

Steps to reproduce

# ~/.zshrc
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
[ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)"
[ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
source "${ZINIT_HOME}/zinit.zsh"

zinit wait lucid for OMZP::aliases

zinit for \
    atload"zicompinit; zicdreplay" \
    blockf \
    lucid \
    wait \
  zsh-users/zsh-completions

Relevant output

No response

Screenshots and recordings

No response

Operating System & Version

OS: darwin22.0 | Vendor: apple | Machine: x86_64 | CPU: arm64 | Processor: arm | Hardware: arm64

Zsh version

zsh 5.9 (x86_64-apple-darwin22.0)

Terminal emulator

xterm-256color

If using WSL on Windows, which version of WSL

None

Additional context

https://github.com/zdharma-continuum/zinit/issues/481 I wonder if this issue means that it can now work without svn, but I don't know how to do it.

Also, there is a solution provided that I am currently using which comes from zi: https://github.com/z-shell/zi/issues/257

Code of Conduct

vladdoster commented 10 months ago

@mefengl,

The {OMZ,PZT}:: notation and snippet ice notation will download a single file (i.e., a snippet) because most plugins are a single file. This breaks the aliases plugin (and a few others) because it relies on other files. Using the svn will leverage subversions and download the whole plugin directory.

You can use the following recipe:

zinit ice svn
zinit snippet OMZ::plugins/aliases
Screenshot 2023-09-01 at 17 57 11
mefengl commented 10 months ago

https://github.com/zdharma-continuum/zinit/issues/481 I wonder if this issue means that it can now work without svn, but I don't know how to do it.

Also, there is a solution provided that I am currently using which comes from zi: https://github.com/z-shell/zi/issues/257

Thanks for the reply. I also mentioned this SVN solution in my issue. What I am asking for is a solution without SVN.

If this is the solution for the current issue, I guess we can close it as not planned.