|
|
|
|
|
by shellsteady
290 days ago
|
|
Thanks! A full CLI is on my list, but you can use Greppers as a terminal app today with fzf: # add to ~/.bashrc or ~/.zshrc
gpr() {
curl -fsSL https://www.greppers.com/data/commands.json |
jq -r '.[] | [.title, .command, (.tags|join(","))] | @tsv' |
fzf --with-nth=1,3 --delimiter='\t' \
--header='type to filter • Enter=copy' \
--preview='printf "⟪ %s ⟫\n\n%s\n" {1} {2}' \
--bind 'enter:execute-silent(echo -n {2} | (pbcopy || xclip -selection clipboard || wl-copy || xsel -ib || clip.exe))+accept'
}
# usage: run `gpr`, type to filter, Enter copies the command
|
|