gum icon indicating copy to clipboard operation
gum copied to clipboard

Gum Table - Add --return-column & --show-columns

Open CaelFrost opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. Rematching data from the selected row to the source table, so that once a choice is made the script can use the full row data versus the subset shown in gum table.

Describe the solution you'd like

  • When sending data in as a table, I often want to include an index column but not show that column to the user in the TUI. not sure if the right choice is to use --show-columns or --hide-columns, but either would solve my need
  • Once the user makes the selection, having gum table return ONLY the columns specified in --return-column=0 will cause gum table to only return the first column of each row, and allows the script to use this returned data to refilter the source table for only the indexes specified.

Describe alternatives you've considered currently adding a 'index' column but this is shown to the user

Additional context Add any other context or screenshots about the feature request here.

CaelFrost avatar Mar 22 '23 14:03 CaelFrost

#415 Should fix the request for the return value

deicon avatar Aug 25 '23 13:08 deicon

I prefer to use 1 if referring to the first column in user facing command args.

deicon avatar Aug 25 '23 13:08 deicon

https://github.com/charmbracelet/bubbles/pull/412 Will be needed to support the hiding feature. Once and If this will be merged to bubbles, I will create a PR here for the --hide-columns feature

deicon avatar Aug 25 '23 18:08 deicon