eget icon indicating copy to clipboard operation
eget copied to clipboard

How do I limit the file to download by extension?

Open IngwiePhoenix opened this issue 1 year ago • 2 comments

Basically: eget caddyserver/caddy -a ".deb" will return three entries, and thus give me an interactive prompt. But, I use eget in my DevContainer to pull down a few useful tools - so this isn't going to fly well :)

What flags do I use to limit eget to only search for .deb files?

Thanks!

IngwiePhoenix avatar Jan 22 '25 09:01 IngwiePhoenix

Hm, so we're doing a substring match somewhere I guess:

❯ eget caddyserver/caddy -a ".deb"
3 candidates found for asset chain: please select manually
(1) caddy_2.9.1_linux_amd64.deb
(2) caddy_2.9.1_linux_amd64.deb.pem
(3) caddy_2.9.1_linux_amd64.deb.sig
Enter selection number:

We could have -a be a regex match I guess? So you could do eget caddyserver/caddy -a '.*\.deb$'

dufferzafar avatar Jan 23 '25 13:01 dufferzafar

Although it's not pretty, you can automate asset selection by piping the number of the asset you want:

 echo "1" | ./eget -a static.tar.gz zyedidia/micro

Obviously doesn't answer the feature request, but it's a workaround that works for me.

heyjoeway avatar Mar 25 '25 15:03 heyjoeway