hotfix zshell-cli autocompletion failing #108

Merged
zach merged 5 commits from hotfix-zshell-autocompletion into main 2026-05-28 23:24:17 +02:00
Showing only changes of commit 0ad28ac017 - Show all commits
+2
View File
@@ -1,4 +1,5 @@
from __future__ import annotations from __future__ import annotations
import os
import sys import sys
from pathlib import Path from pathlib import Path
@@ -49,6 +50,7 @@ def main() -> None:
if "--install-autocomplete" in sys.argv: if "--install-autocomplete" in sys.argv:
_install_completion() _install_completion()
return return
if "_ZSHELL_CLI_COMPLETE" in os.environ:
completion_init() completion_init()
if sys.stdout.isatty() and not _completion_installed(): if sys.stdout.isatty() and not _completion_installed():
print("zshell-cli: Tip: run with --install-autocomplete for tab completion.", file=sys.stderr) print("zshell-cli: Tip: run with --install-autocomplete for tab completion.", file=sys.stderr)