Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle zinit --help #597

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tests/commands.zunit
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@
assert $output contains 'Loaded: '
assert $state equals 0
}
@test 'help' {
for cmd in 'help' '-h' '--help'; do
run zinit $cmd
assert $output contains '—— help – usage information'
assert $state equals 0
done
run zinit -help
assert $output contains 'Unknown subcommand'
assert $state equals 1
}
@test 'self-update' {
run zinit self-update
assert $output contains 'Already up-to-date.'
Expand Down
3 changes: 1 addition & 2 deletions zinit.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,14 @@ sh|silent|\
trackbinds|\
verbose"
ZINIT[cmds]="\
-help|-h|\
add-fpath|\
bindkeys|\
cclear|cd|cdclear|cdisable|cdlist|cdreplay|cenable|changes|compile|compiled|compinit|completions|create|creinstall|csearch|cuninstall|\
delete|debug|\
edit|env-whitelist|\
fpath|\
glance|\
help|\
help|--help|-h|\
ice|\
light|load|\
man|module|\
Expand Down
Loading