Jaymon / captain

command line python scripts for humans
MIT License
13 stars 1 forks source link

captain io.Input.prompt issues #70

Closed Jaymon closed 1 year ago

Jaymon commented 2 years ago

prompt takes a type, and if you pass in type=None then this will be run:

if not type:
    type = lambda: x

But a type callback needs to take a value, the correct lambda is lambda x: x.

Also, the default lambda lower cases the input value, is that desired? I'm wondering if I should create an iprompt that would be case-insensitive because prompt lowercasing a value just totally bit me