Autocompletion is currently broken. This PR aims to resolve the issue.
Calling completion_init() only when _ZSHELL_CLI_COMPLETE env variable is set. Without completion_init(), even when autocomplete was installed, the shell would return Shell zsh not supported..
Autocompletion is currently broken. This PR aims to resolve the issue.
Calling `completion_init()` only when `_ZSHELL_CLI_COMPLETE` env variable is set. Without `completion_init()`, even when autocomplete was installed, the shell would return `Shell zsh not supported.`.
AramJonghu
added the bug label 2026-05-28 14:26:00 +02:00
AramJonghu
self-assigned this 2026-05-28 14:26:00 +02:00
However, running zshell-cli --install-autocomplete when autocompletion is already installed raises a click.exceptions.Exit:
zshell-cli: Shell completion already installed.
Traceback (most recent call last):
File "/usr/bin/zshell-cli", line 8, in <module>
sys.exit(main())
~~~~^^
File "/usr/lib/python3.14/site-packages/zshell/__init__.py", line 51, in main
_install_completion()
~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.14/site-packages/zshell/__init__.py", line 35, in _install_completion
raise typer.Exit()
click.exceptions.Exit
Maybe we should hide this since it isn't very informative and can cause confusion.
Completions now work as intended.
However, running `zshell-cli --install-autocomplete` when autocompletion is already installed raises a `click.exceptions.Exit`:
```
zshell-cli: Shell completion already installed.
Traceback (most recent call last):
File "/usr/bin/zshell-cli", line 8, in <module>
sys.exit(main())
~~~~^^
File "/usr/lib/python3.14/site-packages/zshell/__init__.py", line 51, in main
_install_completion()
~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.14/site-packages/zshell/__init__.py", line 35, in _install_completion
raise typer.Exit()
click.exceptions.Exit
```
Maybe we should hide this since it isn't very informative and can cause confusion.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Autocompletion is currently broken. This PR aims to resolve the issue.
Calling
completion_init()only when_ZSHELL_CLI_COMPLETEenv variable is set. Withoutcompletion_init(), even when autocomplete was installed, the shell would returnShell zsh not supported..Completions now work as intended.
However, running
zshell-cli --install-autocompletewhen autocompletion is already installed raises aclick.exceptions.Exit:Maybe we should hide this since it isn't very informative and can cause confusion.
Resolved now. It returns a simple print.