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

fix(completions): convert to click@8 and update docs #369

Closed
wants to merge 1 commit into from

Conversation

lwille
Copy link

@lwille lwille commented Aug 6, 2021

addresses #367

click greatly reworked their completions in pallets/click#1484 and pallets/click#1622.
In consequence, click doesn't add an autocomplete command any more, so I've adjusted the shell snippets required to register completions.

  • I've updated README to new mechanism:
    • The autocompletion parameter for options and arguments is renamed to shell_complete. The function must take ctx, param, incomplete, must do matching rather than return all values, and must return a list of strings or a list of CompletionItem. The old name and behavior is deprecated and will be removed in 8.1.

    • The env var values used to start completion have changed order. The shell now comes first, such as {shell}source rather than source{shell}, and is always required.

  • I've renamed autoompletion parameters of @click.arguments and @click.options

I've also noticed that #143 is obsolete, as click fully supports fish:
fixes #143

@fzimmermann89
Copy link

Are you still working on this?

@lwille
Copy link
Author

lwille commented Oct 12, 2021

I gave up on this; closing the PR.

@lwille lwille closed this Oct 12, 2021
@stratakis
Copy link

I've tested this patch on the Fedora rpm and it fixes the test failures that sprouted from the latest click version (8.1.2). More specifically it addresses the TypeError: Parameter.__init__() got an unexpected keyword argument 'autocompletion' error. Not sure if there are other issues regarding the behavior change.

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 this pull request may close these issues.

fish completions?
3 participants