flask-script icon indicating copy to clipboard operation
flask-script copied to clipboard

Documentation for resolve parameter on prompt_choices

Open hugo-cisneiros-movile opened this issue 8 years ago • 1 comments

Hi, I tried to use prompt_choices and it wasn't working with case sensitive options. For example:

Which cluster? - (Cluster1): Cluster1
Which cluster? - (Cluster1): cluster1
Which cluster? - (Cluster1): 
...

Looking at the cli.py code, there is a resolve parameter that defaults to ascii_lowercase. Later in the method, the option is passed by this resolve function and every options turns to lowercase before comparing.

I fixed this calling prompt_choices with resolve=str instead of ascii_lowercase.

It would be good if this parameter was listed/described in the API documentation :)

Thanks!

hugo-cisneiros-movile avatar May 25 '16 16:05 hugo-cisneiros-movile

PR welcome

jeffwidman avatar Aug 17 '16 23:08 jeffwidman