Skip to content

Conversation

@antonbaliasnikov
Copy link
Contributor

What ❔

Fixes zkstack completion for zsh shell.

Why ❔

For zsh shell default completion will fail with the following error:
command not found: compdef
because autocompletion is not activated by default.

This PR adds the following to activate it on zsh in addition to source of the autocompletion script:

autoload -Uz compinit
compinit

*Related thread

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zkstack dev fmt and zkstack dev lint.

@popzxc popzxc added this pull request to the merge queue Jan 20, 2025
Merged via the queue into main with commit d9e911c Jan 20, 2025
32 checks passed
@popzxc popzxc deleted the aba-fix-zsh-completion branch January 20, 2025 10:53
zkzoomer pushed a commit that referenced this pull request Jun 21, 2025
## What ❔

Fixes `zkstack` completion for `zsh` shell.

<!-- What are the changes this PR brings about? -->
<!-- Example: This PR adds a PR template to the repo. -->
<!-- (For bigger PRs adding more context is appreciated) -->

## Why ❔

For `zsh` shell default completion will fail with the following error:
`command not found: compdef`
because autocompletion is not activated by default.

This PR adds the following to activate it on `zsh` in addition to
`source` of the autocompletion script:
```
autoload -Uz compinit
compinit
```

*[Related
thread](https://unix.stackexchange.com/questions/339954/zsh-command-not-found-compinstall-compinit-compdef)

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [x] Tests for the changes have been added / updated.
- [x] Documentation comments have been added / updated.
- [x] Code has been formatted via `zkstack dev fmt` and `zkstack dev
lint`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants