gum
gum copied to clipboard
gum choose selected is not selected
Describe the bug
when providing gum choose --selected foo
with many items it automatically span the items on multiple pages, if the given selected value (foo
) is on a different page, gum will:
- not display the correct selection
- pressing enter (without doing anything else), returns the given selected value (
foo
) and not the highlighted value
To Reproduce
$ sel=$(echo -e "1\n2" | gum choose --selected 2 --height 1)
> 1
••
$ echo $sel
2
Expected behavior
gum should select jump to the page where the given selected value (e.g. foo
) appear and select the highlighted value
Desktop (please complete the following information):
- OS: MacOS
- Version 13.5
- Gum version: 0.11.0
I think this is the same issue as #394. It has already been fixed but there's not a new release yet.
It has already been fixed but there's not a new release yet.
then a new release is a must :) thanks
Tested, and it's indeed fixed in https://github.com/charmbracelet/gum/commit/6763de12e8e3ad28aa4c8baf4ce2816d564e1000, but not released yet.
@fharper @piero-vic do you know when there will be a new release?
No idea (I'm not a maintainer), but until they release, you can uninstall it, clone the repository, and go install .
. You need Go installed though.
@maaslalani apologies for pulling you in. do you know when there will be a new release?