Skip to content

Fix zsh completion for namespaced commands#535

Open
itscloud0 wants to merge 2 commits into
python-poetry:mainfrom
itscloud0:fix-153-zsh-subcommand-completion
Open

Fix zsh completion for namespaced commands#535
itscloud0 wants to merge 2 commits into
python-poetry:mainfrom
itscloud0:fix-153-zsh-subcommand-completion

Conversation

@itscloud0

Copy link
Copy Markdown

Summary

  • complete namespaced zsh commands one token at a time instead of inserting escaped spaces
  • resolve command options using the full namespaced command path
  • add a regression test and news fragment for the zsh completion behavior

Fixes #153

Testing

  • uv run --python 3.12 --with pytest --with pytest-mock pytest tests/commands/completion/test_completions_command.py tests/commands/test_command.py -q
  • uv run --python 3.12 --with ruff ruff check src/cleo/commands/completions_command.py src/cleo/commands/completions/templates.py tests/commands/completion/test_completions_command.py
  • uv run --python 3.12 --with ruff ruff format --check src/cleo/commands/completions_command.py src/cleo/commands/completions/templates.py tests/commands/completion/test_completions_command.py

@itscloud0 itscloud0 marked this pull request as ready for review June 28, 2026 17:08
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zsh completion for sub-commands adds an extra slash and fails to complete sub-command options

1 participant