Zsh completion for sub-commands adds an extra slash and fails to complete sub-command options
@itscloud0 ci sta già lavorando.
Dal 27/6/2026.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 38/100
Direzione di ricerca
Start by reproducing the two zsh completion cases described: poetry env adds a slash, and poetry env info --p shows global options instead of --path. Trace the generated completion entry point and its tests, then verify that subcommands complete without the extra slash and that their options are offered.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
With the beta version 1.2.0b1 of Poetry I can see that sub-commands and their options show up in the generated zsh completion script.
However, there is some weird behavior when trying to tab-complete on zsh command line.
First of all, it completes the sub-command with an additional slash: poetry env\ info – which is not a valid command..
poetry env + tab adds the slash and shows the expected subcommands:
❯ poetry env\
env info -- Displays information about the current environment.
env list -- Lists all virtualenvs associated with the current project.
env remove -- Remove virtual environments associated with the project.
env use -- Activates or creates a new virtualenv for the current project.
Also, with this my zsh is unable to autocomplete the option(s) for the subcommand. I was trying poetry env info --p + tab, hoping to get --path completed but zsh just offers the global options of poetry:
❯ poetry env info --p
--help -- Display help for the given command. When no command is given display help for the list command.
--no-interaction -- Do not ask any interactive question.
--quiet -- Do not output any message.
--version -- Display this application version.
References:
- For more background, there's this original discussion on Poetry side: https://github.com/python-poetry/poetry/issues/1855#issuecomment-1140250076
- Maybe related (?): https://github.com/python-poetry/cleo/issues/133 (although it's about bash completion, not zsh).
- Seems like there's an issue about entirely missing the sub-commands with zsh https://github.com/python-poetry/cleo/issues/84 – likely that issue is basically resolved because now the sub-commands are showing up?
- Lingua principale
- Python
- Stelle
- 1.4k
- Fork
- 103
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di python-poetry/cleo
-
question
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
python-poetry/cleo#471 · 2 commenti ·
-
feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
python-poetry/cleo#467 · 1 reazione ·
-
Poetry run doesn't work with --directory=Forse già presa @DSeaStar l’ha presa 58 giorni fa. Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
python-poetry/cleo#434 · 1 commento ·
-
Support for clink completionApertafeature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
python-poetry/cleo#433 · 4 commenti ·
-
Formatter's `is_decorated` property is temporarily disabled during `remove_format` breaking concurrent threadsForse già presa @ShipItAndPray l’ha presa 167 giorni fa. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 40/100
python-poetry/cleo#423 · 9 commenti ·
Tutte le issue di python-poetry/cleo
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 83/100
PedestrianDynamics/pyFDS-Evac#766 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 91/100
alchaincyf/nuwa-skill#86 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 2 giorni
-
Docs Needs Triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
pandas-dev/pandas#71055 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: graphify reads files that git's global ignore file hidesForse già presa @smngvlkz l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Graphify-Labs/graphify#4335 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno