charmbracelet / gum

A tool for glamorous shell scripts 🎀
MIT License
17.33k stars 330 forks source link

How to replace fzf #502

Open CRAG666 opened 4 months ago

CRAG666 commented 4 months ago

Your project is great and I would like to completely replace fzf, I leave an example of what I want to replace:

pacman -Slq | fzf --multi --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S

maaslalani commented 4 months ago

Hey @CRAG666, you can use gum filter with the --no-limit flags here.

pacman -Slq | gum filter --no-limit | xargs -ro sudo pacman -S

Regarding the preview, you have to use cut(1) to extract the data you want.

https://www.man7.org/linux/man-pages/man1/cut.1.html

CRAG666 commented 4 months ago

How?