marcosnils / bin

Effortless binary manager
MIT License
712 stars 47 forks source link

feat: Remember last release match #200

Open mbevc1 opened 5 months ago

mbevc1 commented 5 months ago

More and more vendors are packaging more files than just a binary, e.g. different packages or SBOMs, and updating is a bit more tedious when trying to pick the desired binary or package from a long list of options :smile: .

Example:

   • /home/marko/bin/trivy v0.52.1 -> v0.52.2 (https://github.com/aquasecurity/trivy/releases/tag/v0.52.2)

Do you want to continue? [Y/n] 
   • Getting v0.52.2 release for aquasecurity/trivy

Multiple matches found, please select one:

 [1] trivy_0.52.2_Linux-64bit.deb.pem
 [2] trivy_0.52.2_Linux-64bit.deb.sig
 [3] trivy_0.52.2_Linux-64bit.rpm.pem
 [4] trivy_0.52.2_Linux-64bit.rpm.sig
 [5] trivy_0.52.2_Linux-64bit.tar.gz
 [6] trivy_0.52.2_Linux-64bit.tar.gz.pem
 [7] trivy_0.52.2_Linux-64bit.tar.gz.sig
 [8] trivy_0.52.2_Linux-ARM64.deb.pem
 [9] trivy_0.52.2_Linux-ARM64.deb.sig
 [10] trivy_0.52.2_Linux-ARM64.rpm.pem
 [11] trivy_0.52.2_Linux-ARM64.rpm.sig
 [12] trivy_0.52.2_Linux-ARM64.tar.gz
 [13] trivy_0.52.2_Linux-ARM64.tar.gz.pem
 [14] trivy_0.52.2_Linux-ARM64.tar.gz.sig
 [15] trivy_0.52.2_Linux-PPC64LE.deb.pem
 [16] trivy_0.52.2_Linux-PPC64LE.deb.sig
 [17] trivy_0.52.2_Linux-PPC64LE.rpm.pem
 [18] trivy_0.52.2_Linux-PPC64LE.rpm.sig
 [19] trivy_0.52.2_Linux-PPC64LE.tar.gz
 [20] trivy_0.52.2_Linux-PPC64LE.tar.gz.pem
 [21] trivy_0.52.2_Linux-PPC64LE.tar.gz.sig
 Select an option: 5

I think it would be great if we'd have a mechanism to remember last match/option and default to that.