awslabs / aws-shell

An integrated shell for working with the AWS CLI.
Apache License 2.0
7.15k stars 770 forks source link

Fuzzy Select Interaction #142

Closed joguSD closed 7 years ago

joguSD commented 7 years ago

A fuzzy select interaction to address some of the feedback Dave had at the wizards planning meeting. This interaction will allow the user to type which will apply the fuzzy search algorithm to filter the list. It will also validate that the input is from the list and reject all others. This is using the SentenceValidator class which was failing tests on python 2.6 due to having a set comprehension. I've made a pull request upstream which has been merged as of prompt_toolkit v1.0.6. As such the minimum version will be bumped to v1.0.6

@JordonPhillips @jamesls

Displaying all options

screen shot 2016-08-15 at 17 11 19

Filtering the list by typing

screen shot 2016-08-15 at 17 11 43

Validating input is part of the list

screen shot 2016-08-15 at 17 12 02
JordonPhillips commented 7 years ago

Could you link to the prompt toolkit pr?

joguSD commented 7 years ago

The upstream pull request: https://github.com/jonathanslenders/python-prompt-toolkit/pull/374

JordonPhillips commented 7 years ago

Could we get a test for typing something outside of the list? Everything else looks good.

JordonPhillips commented 7 years ago