On Thu, 8 Jul 2021 at 22:15, Richard Beels via Cygwin wrote: > 2, use fzf. i don't use it (yet?) but it should be something like: > > cyginst() { # a little function to install a package from the cli > _pkg=$(cygsearch "$1" | fzf | cut -f1 -d'-' ) > /setup-x86_64.exe ... -P "$_pkg" > } > > the cut is to strip off all the versioning choices. i think fzf can > even allow you to edit the choice you make to eliminate that. or you > you change the cut to a sed and only strip off '-[0-9]*' for apps > that use a dash in their real name (can't think of one ottomh, but...). > > fzf is packaged for cygwin and the github page has more help than I > cared to read when I found it. :)
Just as a warning: the fzf package available on Cygwin is an old and unsupported version. The upstream fzf project switched to Go, which doesn't have a Cygwin compiler, so bringing it up-to-date is not an easy project. In particular, while I expect the core fzf function is absolutely fine, it's not safe to assume that anything in particular in the upstream documentation matches the behaviour of the fzf version available through Cygwin. -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple