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

Ability to hook custom tab-completions for options, arguments #1

Open
untitaker opened this issue Jul 22, 2015 · 3 comments
Open

Ability to hook custom tab-completions for options, arguments #1

untitaker opened this issue Jul 22, 2015 · 3 comments

Comments

@untitaker
Copy link
Collaborator

E.g. show a datepicker, useful for todoman.

@untitaker untitaker self-assigned this Jul 23, 2015
@rcarmo
Copy link

rcarmo commented May 15, 2017

This is amazing work (very useful to me, at least), and would like to see this first issue closed 😄

@untitaker untitaker removed their assignment Oct 25, 2017
@GhostOps77
Copy link
Contributor

Can u provide any example for this? like sample use case, and sample output?

@tmahmood
Copy link

tmahmood commented Jul 21, 2023

EDIT: As it seems, this feature exists, but there is a bug. I am submitting a bug report

Let me chime in. Say I want to edit a task, and have something like this

todo --edit <task_id>

In the code for --edit I can have something like this

@click.option(
    "-e",
    "--edit",
    type=click.Choice(todo.list_task_id_and_name())
)

Now for --edit when we try to tab to autocomplete it should display the list of task ID and title

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

No branches or pull requests

4 participants