charmbracelet / gum

A tool for glamorous shell scripts πŸŽ€
MIT License
17.94k stars 339 forks source link

gum v0.14.0 confirm: no longer able to answer with Y/N keys #568

Closed ptrcnull closed 2 months ago

ptrcnull commented 5 months ago

Describe the bug the prompt "Are you sure?" was dismissable by simply pressing the "Y" key to answer "Yes" or "N" to answer "No" - this is no longer the case

To Reproduce Steps to reproduce the behavior:

  1. launch gum confirm
  2. click the y key on your keyboard
  3. nothing happens

Expected behavior the "Y" key acts as if "Enter" was pressed when option "Yes" was highlighted

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

farzadmf commented 4 months ago

This is REALLY annoying and it seems to have been introduced by @maaslalani in #522

Moreover, we were able to use ctrl+j/k (or tab) to navigate the options, which is no longer possible. Basically a literal example of a big breaking change!

I tried to ping them in that PR, but no reply πŸ™

aymanbagabas commented 2 months ago

Fixed in https://github.com/charmbracelet/huh/commit/ccca06d54254036ee839c17e21a38560efc523a8

ptrcnull commented 2 months ago

IMHO it shouldn't be closed until it gets fixed in a stable release of gum

meowgorithm commented 2 months ago

@ptrcnull We typically close issues when the fix hits main (which we've just done). That said, this will indeed be available in the next release.

farzadmf commented 2 months ago

Thank you @csandeep for the PR; this was a really big breaking change (at least in my experience); eagerly waiting for the new release!

meowgorithm commented 2 months ago

@farzadmf in the meantime, if you have go installed, you can install the version on main with go install github.com/charmbracelet/gum@main.

farzadmf commented 2 months ago

You're right @meowgorithm , thank you!

I think I'm gonna wait for the brew update since I keep it up-to-date very regularly. Gonna suffer the pain a bit more (I'll most probably miss updating my individually installed go packages)

meowgorithm commented 2 months ago

Alrighty, just a note that this is now available in Gum v0.14.2…and will be coming soon to a package manager near you.

farzadmf commented 2 months ago

Was excited for the release, but sadly it doesn't seem to bring back tab navigation for gum confirm πŸ™

I wish it wasn't added in the first place in gum since every single time I show confirm, my fingers press TAB, only to see it not working and having to reach out to the arrow keys!

farzadmf commented 1 month ago

@meowgorithm I pinged @csandeep in the commit as well, but tab/shift+tab don't seem to be working in confirm