zinit icon indicating copy to clipboard operation
zinit copied to clipboard

[bug]: zinit ls command is missing

Open turboBasic opened this issue 1 year ago • 2 comments

What happened?

zinit ls command fails

Steps to reproduce

  1. Clone zinit
  2. Run zinit ls
  3. Error message is displayed:
$ zinit ls
ERROR: Unknown subcommand: `ls` (it should be one of, e.g.: `load`, `snippet`, `update`, `delete`, …, e.g.: `zinit load username/reponame`) or a for-based command body (i.e.: e.g.: `zinit …ice-spec… for …(plugin or snippet) ID-1 ID-2 ⋯⋯…`). See `help` for a more detailed usage information and the list of the subcommands.

To help reproducing the bug in a clean environment I have created PR #671 (WIP) with added test for zinit ls command. The test currently fails.

Relevant output

ERROR: Unknown subcommand: ls (it should be one of, e.g.: load, snippet, update, delete, …, e.g.: zinit load username/reponame) or a for-based command body (i.e.: e.g.: zinit …ice-spec… for …(plugin or snippet) ID-1 ID-2 ⋯⋯…). See help for a more detailed usage information and the list of the subcommands.

Screenshots and recordings

No response

Operating System & Version

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

Zsh version

zsh 5.9 (x86_64-apple-darwin23.0)

Terminal emulator

xterm-256color

If using WSL on Windows, which version of WSL

None

Additional context

At the moment I cannot provide any meaningful root cause analysis as I am not fluent enough in zinit code. I am suspicious that loading zinit-autoload.zsh is broken somewhere as function .zinit-list-snippets which seems to be an implementation of zinit ls command is not autoloaded as well:

$ .zinit-list-snippets
zsh: command not found: .zinit-list-snippets

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

turboBasic avatar Sep 27 '24 14:09 turboBasic

"zinit snippets" lists snippets and "zinit plugins" the plugins. Readme, "zinit help" and "zinit man" shows outdated info.

nkahe avatar Oct 18 '24 11:10 nkahe

"zinit snippets" lists snippets and "zinit plugins" the plugins. Readme, "zinit help" and "zinit man" shows outdated info.

So should I try to propose PR for fixing documentation and help?

turboBasic avatar Oct 19 '24 10:10 turboBasic