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 when editing values based on Shell Completions #41

Open
benwart-consensus opened this issue Jun 6, 2023 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@benwart-consensus
Copy link

Click Options have a shell_complete kwarg that takes a function that returns a list of completions. It would be helpful if trogon supported running this function by passing in the context and param based similar to how click does so that a dropdown of completions could be shown to pick from.

See Also: Click documentation on how Shell Completions are implemented

@fresh2dev
Copy link

I could see this being handled via the existing choices logic within Trogon. But that would make click choices and shell_complete mutually-exclusive in the context of Trogon; i.e., what would Trogon display in the drop-down if both choices and shell_complete were provided?

@darrenburns
Copy link
Member

darrenburns commented Jun 12, 2023

This is a nice idea - we have the Suggester feature in Textual now too which shows the greyed-out completion text that could be leveraged while implementing this.

@darrenburns darrenburns changed the title Feature Request: Completions when editing values based on Shell Completions Completions when editing values based on Shell Completions Jun 26, 2023
@darrenburns darrenburns added the enhancement New feature or request label Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants