Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completions command cannot generate completions for subcommands #84

Closed
zevisert opened this issue Sep 14, 2020 · 2 comments · Fixed by #358
Closed

completions command cannot generate completions for subcommands #84

zevisert opened this issue Sep 14, 2020 · 2 comments · Fixed by #358
Milestone

Comments

@zevisert
Copy link

The completions command added in c0048bb uses a one-level-deep template. There is no room in this template to generate completions for subcommands in a given context, so in general this means scenarios like the following cannot have completions generated for them.

[program] command subcommand --<tab>

This comes from python-poetry, where no completions exist for poetry env <tab> or poetry env list --<tab>

@dinkopehar
Copy link

Just ran on this problem while using fish shell:

poetry completions fish | fish

Output:

complete: too many arguments

Standard input (line 25):
complete -c poetry -f -n '__fish_poetry_e83f4a1a4a219fe0_complete_no_subcommand' -a cache clear -d 'Clears Poetry\'s cache.'
^

(Type 'help complete' for related documentation)
complete: too many arguments

Standard input (line 26):
complete -c poetry -f -n '__fish_poetry_e83f4a1a4a219fe0_complete_no_subcommand' -a cache list -d 'List Poetry\'s caches.'
^
...

Since I've installed poetry via brew, I constantly see errors after I hit "poetry " +

Maybe disable generating commands which contain subcommands as temporary solution ?

@drin
Copy link

drin commented Jul 18, 2023

The issue mentioned by dinko-pehar (purposely not notifying since it's an old post) is addressed by the commit in python-poetry/poetry#5929.

When I run this command: poetry completions fish | fish, I see the list of commands that fixed by issue 5929.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants