Issue #632: the pager machinery already recognized -n/--no-pager
globally and .zinit-pager already honors OPTS[opt_-n,--no-pager], but
self-update rejected the flag with "Incorrect options given". Allow it
so the commit list can be printed straight to the terminal; help and
error output pick the flag up automatically from the option map. Also
offer the flag in the _zinit completion.
Closes#632
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
Issues addressed:
1. Confusing and unintuitive command names
Currently, two commands `loaded` and `list` will list installed
plugins and a single command `ls` lists installed snippets. The namea
don't make much sense or give context to their behavior, nor does
having two commands with identical behavior.
This PR removes the three commands in favor of two new commands
`list-snippets` and `list-plugins`. The names align with the action they
perform.
2. Uninformative output
Current output is hard to grok.
This PR cleans up the output format and uses color to help convey
information.
3. Incorrect
Output does not account for various situations with the only way to
fix is to reload Zsh session which would not always fix it. See images
below for the aforementioned situations.
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
- Add all subcommand short & long flags
- Handle mutually exclusive options. For example, a user shouldn't be
able to select the `--all` flag and a plugin in `zi delete` but should
be able to select the `--yes` or `--quiet`
- Handle the zinit limitation of only taking one plugin in various
commands (i.e., delete, uncompiled)
Examples:
- Don't show users plugins in the `zi delete` when they have already
selected one to avoid an error.
- Only let the user select one flag option in `zinit time`.
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>