Skip to content

Autocomplete

An autocomplete widget that allows the user to type a query and select from a list of matching options.

Example

Example

from inquirer_textual import prompts

if __name__ == '__main__':
    result = prompts.autocomplete('Planet:',
                                  completions=['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus',
                                               'Neptune'])
    print(result)