noahp / emoji-fzf

🕵emoji picker that pairs nicely with fzf --preview
40 stars 5 forks source link

Allow Multiple Emojis to be Selected #15

Closed JoaquimEsteves closed 3 years ago

JoaquimEsteves commented 3 years ago

This project is neat. But I'd love the ability to select multiple emojis using fzf's -m, -multi option.

I've hacked something together with just bash and you can stick it in the README if you'd like; but it doesn't feel very ergonomic to me

emoji-fzf preview  \
| fzf -m --preview "emoji-fzf get --name {1}" \
| cut -d " " -f 1 \
| while read -r line; do echo $(echo $line | emoji-fzf get); done

I'd propose a get-multiple, that would accept \n separated emoji_codes. So you'd use it like so:

emoji-fzf preview  \
| fzf -m --preview "emoji-fzf get --name {1}" \
| cut -d " " -f 1 \
| xargs -I emoji-fzf get-multiple
noahp commented 3 years ago

oh this is a great idea! will add this