#compdef python
# zsh completion for pythonrs `python`.
_python() {
_arguments -s \
'(-c --command)'{-c,--command}'[execute a one-liner]:source' \
'(-m)-m[run a library module as a script (delegates to embedded CPython runpy)]:module' \
'-u[force unbuffered stdout/stderr]' \
'-E[ignore PYTHON* env vars (drop-in compat)]' \
'-I[isolated mode (drop-in compat)]' \
'-O[optimization level (drop-in compat)]' \
'-S[no site import (drop-in compat)]' \
'-B[do not write bytecode caches (drop-in compat)]' \
'-W[warning filter]:action' \
'*-X[implementation-specific option]:option' \
'--build[AOT-compile to a native executable]' \
'--dump-bytecode[print lowered fusevm bytecode]' \
'--dump-tokens[print the lexer token stream]' \
'--dump-ast[print the parsed AST]' \
'--disasm[print a fusevm bytecode disassembly listing]' \
'--tiers[run it, then report which fusevm execution tier took each chunk]' \
'--repl[start the interactive REPL]' \
'--lsp[speak LSP over stdio]' \
'--dap[speak DAP over stdio]' \
'--doctor[print a runtime/CPython/cache/env diagnostic report]' \
'--cacheview[list the compiled programs in the rkyv bytecode cache]' \
'--cache-clear[delete the rkyv bytecode cache shard]' \
'(-h --help)'{-h,--help}'[show help]' \
'(-V --version)'{-V,--version}'[show version]' \
'*:Python file:_files -g "*.py"'
}
_python "$@"