Skip to content

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

Description

@juhoautio

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:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions