Is anyone familiar with gum?
I have a simple:
while true; do
CHOICE=$(gum choose "one" "two" "three")
case "$CHOICE" in
"one")
<do something>
"two")
<do something>
"three")
<do something>
esac
done
If the user hits ESC
, gum displays “nothing selected” and exits.
Is there a way to disable the “nothing selected”? I tried redirecting 2>/dev/null
but it suppresses the entire menu. I also tried adding '\x1b'
to the case, but it did nothing.
I also tried adding:
if [ -z "$CHOICE" ]; then
exit 0
fi
directly after CHOICE=$(gum choose...)
.
No dice.
Thanks for taking a look.