gum
gum copied to clipboard
[Feature] Allow filter with no limits, like `fzf --multi`.
Problem
I am trying to achieve something similar to fzf --multi
functionality where I can pipe/filter output from one program through gum
for (1) fuzzy-finding and (2) selecting multiple options.
I can accomplish one or the other, like:
-
gum choose --no-limit
but I cannot fuzzy search, or -
gum filter
but I cannot select multiple options.
Info
$ brew info gum
charmbracelet/tap/gum: stable 0.1.0
Repro Steps
$ echo -e "abc\ndef\nghi\njkl\nmno\npqr\nstu\nvwx\nyz" | gum choose --no-limit
# cannot type anything
$ echo -e "abc\ndef\nghi\njkl\nmno\npqr\nstu\nvwx\nyz" | gum filter
# cannot select multiple options
Possible Solution
Since gum filter
already has fuzzy finding algorithm implemented, so it might be a relatively easier lift to implement multi-selection with something like --no-limit
(similar to gum choose
) and TAB (not SPACE since it could be part of the search pattern/string) to select the current line and move the pointer to the next line.
I would also like a feature like this, because the fuzzy feature is awesome. Maybe the selected items could be stickied to the top of the search results? I don't know.
Hey, thank you for this very well written issue ❤️
The proposal sounds very reasonable to me!
This is now implemented in #130 thanks to @fedeztk!
gum filter --no-limit
May I request that this be added to the README? I tried gum filter --no-limit
on a hunch and could see that it was possible to select multiple but couldn't figure out how to select them! Drove me crazy until I found this PR 😄
Ah yes! Adding this to the README right now, thank you @miridius!
Adding this to the README right now
It doesn't mention tab.
Also, it's not ideal that gum choose
only works with space and not tab.
I use both in a script - would be nicer to just tell people in the beginning that they can select multiple items with tab.
Ok, just saw #200 and that it's not released yet.