X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 05CA3385800B
Authentication-Results: sourceware.org;
 dmarc=none (p=none dis=none) header.from=dinwoodie.org
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dinwoodie.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=dinwoodie.org; s=google;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=QkpNsWXEG5czQerCTcXwxSjCA9GTxsPMO9gpfnbcZBo=;
 b=hjPuMNrTiAT/1o9A63R7I55byREnNOBKMpl+1HVsH+FQDIcF90+pJ2FQ5BPup6xtt3
 ZjD0wXXzTO5i8c2K+fJBohJSaqag/RKrBzpj0H0Veyk0I9/pe0nNaeblK5Kv4xiEZAkB
 MT1zC1195SZn68Te7TYEjPBASQNwSry7+kcqc=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=QkpNsWXEG5czQerCTcXwxSjCA9GTxsPMO9gpfnbcZBo=;
 b=m9diT0U05ynCExVsC4+/Hsw/9Fnp1QWTZAQkLMif3UEekl8gupPhGm5GZY2d5oHFkk
 rHXrPyzj0h6Z0+pTTUZb37pN2Wyn0P9OPcyeNw70W+jrTazbjCtHlQhPr1lRu0jTxJCy
 EKbMEfP/KEFkM+D1W7mT7aAeiRRNjgGPLRpohE7z7t0B1dxEwiT6GHuch4epH2Heym5N
 9iGzxVNPmTq3xbbdjNkrU9/qD0RRFa9T84JNBnaRwrzHfeB1E/bygueeEBR+yYBoiyNv
 LPQkJ/HqE3S0mS4CRbhz67eYRBb5iiVz1g0nDHq9b4q+6fo9CcPTlsxxlcrpGThss0rK
 bJCg==
X-Gm-Message-State: AOAM532/Pesx3Mih22mM7gFj76IOd0OUmC39OuaND1AAbIkWmpKsReeX
 CVHq3cTCMe2hV0lkc1vaL9eZGjhN0Qef2+oPVEb4FxXTKig=
X-Google-Smtp-Source: ABdhPJy1qE2sDAFMlYBPcidezANYfhglwtjPpvJhpP/AslzDfbHJeGgEpbUUtdPS5G0wWT/tneaJKfFfDuKkYIHAzdQ=
X-Received: by 2002:ac8:5e8e:: with SMTP id r14mr16944669qtx.128.1625926421462; 
 Sat, 10 Jul 2021 07:13:41 -0700 (PDT)
MIME-Version: 1.0
References: <20210708084556.GA7359@tik.uni-stuttgart.de>
 <bf14fb2b-ddf5-8618-0da3-9ea5531c5877@dronecode.org.uk>
 <20210708141913.GA21966@tik.uni-stuttgart.de>
 <20210708211539.705673AA9C30@sourceware.org>
In-Reply-To: <20210708211539.705673AA9C30@sourceware.org>
From: Adam Dinwoodie <adam@dinwoodie.org>
Date: Sat, 10 Jul 2021 15:13:09 +0100
Message-ID: <CA+kUOano_G-ZqQzi5O_9igB09EAzUbLjbCfmW36HSP80NX=X0w@mail.gmail.com>
Subject: Re: search and install packages via bash?
To: "Cygwin (cygwin@cygwin.com)" <cygwin@cygwin.com>
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,
 SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

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
