Replies: 1 comment 1 reply
-
|
You can do this by combining a Example: from prompt_toolkit import prompt
from prompt_toolkit.completion import WordCompleter
choices = [
"Google",
"Cloudflare",
"Quad9",
"AdGuard",
"OpenDNS",
]
completer = WordCompleter(
choices,
ignore_case=True,
)
result = prompt(
"Pick a provider: ",
completer=completer,
)
print(result)For a more custom UI with live filtering and keyboard navigation, the usual approach is:
Also, |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How to achieve the same behavior of
prompt_toolkit.shortcuts.choicebut with an extra text input field that allows user to filter/search choices. Is there a library based on prompt-toolkit that support that already?Thanks
Beta Was this translation helpful? Give feedback.
All reactions