Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripts utilizing gum table broke after v0.15.0, selections turn into static text #808

Closed
lwbt opened this issue Jan 17, 2025 · 2 comments
Closed

Comments

@lwbt
Copy link

lwbt commented Jan 17, 2025

Describe the bug
I have some scripts where gum table is used to offer menu style selections. After upgrading to v0.15.0 I cannot make selections anymore, the code sections only produce static output instead of interactive output.

To Reproduce
Steps to reproduce the behavior:

  1. Create and run the example script

Example code:

#!/bin/bash

MAIN_ITEMS="
COMMAND;EXPLANATION\n
test1;Some explanation\n
test2;Some explanation\n
test3;Some explanation\n
"

# Test Case 1
SELECTION="$(
  echo -e "${MAIN_ITEMS}" \
    | gum table -s ";"
)"

echo "${SELECTION##*;}"

# Test Case 2
echo -e "${MAIN_ITEMS}" \
  | gum table -s ";"

Expected behavior
Before v0.15.0 Test Case 1 used to work the same way as Test Case 2. Both would bring up a kind of menu where the user can make a selection.

After upgrading to v0.15.0 Test Case 1 got turned into static text output with a table drawn around it and no selection possible. Test Case 2 still works as expected, but using gum only in this way severely reduces its usefulness.

Screenshots
See explanation one paragraph above.

I can see that the line with test one is in bold, but that's it, it's just static text.

Image

Desktop (please complete the following information):

  • OS: Ubuntu 24.04
  • Browser [e.g. chrome, safari]
    • It's gum, I'm using it in a terminal, it this the right template?
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@lwbt
Copy link
Author

lwbt commented Jan 17, 2025

Related: #800

@caarlos0
Copy link
Member

duplicated of #800 I think?
let me know otherwise, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants