charmbracelet / huh

Build terminal forms and prompts 🤷🏻‍♀️
MIT License
3.72k stars 94 forks source link

Empty confirmation considered invalid in accessible mode #264

Open testinfected opened 1 month ago

testinfected commented 1 month ago

Describe the bug When using the confirm field in accessible mode, user gets prompted to:

Choose [y/N]:

But when pressing enter, I was expecting the N choice to apply whereas I get:

Choose [y/N]:
invalid input. please try again
Choose [y/N]:

Looking at the code parseBool in accessibility.go expects exactly one of "y,", "yes","n" or "no". So the default value does not apply.

testinfected commented 1 month ago

WDYGT?

Thanks