Add a --selected-delimiter flag to gum choose (#937) #1086
renezander030
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, and thanks for gum.
Per the contributing guide I am opening this as a Discussion before any PR.
gum choose --selectedpreselects items by splitting on the input delimiter (comma by default). If an option value itself contains a comma, it cannot be preselected, because the same delimiter splits both the option list and the selected list.Proposal: add a
--selected-delimiterflag that defaults to the current behavior, so the selected list can use a different separator than the options. Existing scripts keep working, and it only matters when an option contains the delimiter.This tracks #937. If you are open to it, I can send a small PR with the flag and a test, and adjust the flag name or default to match your preference.
Rene
Beta Was this translation helpful? Give feedback.
All reactions