From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) by sourceware.org (Postfix) with ESMTPS id 112653853817 for ; Sat, 10 Jul 2021 04:21:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 112653853817 Received: by mail-qk1-x72c.google.com with SMTP id b18so11760792qkc.5 for ; Fri, 09 Jul 2021 21:21:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:from:date:to:subject:in-reply-to :references:mime-version; bh=BNQZe2ixqXqzOCp1+NJf9khO92Ics02/p/bCnxWgGr0=; b=PZtdMXQQOfUCU2dhxQsLUFgaGmysGaMLJuSNRUpNfwy9WxL9Ckvu0fxEmoxzvT2vN/ mKVjQYPXIXUG7rwgm1s21Yj40SuEwhc3dJtAY4XhWEl6NYc5T9vBaIMG1Ly6N82KTp5Y H33MaUv3928DOrFxv4Qn1U4Fvy2SG+MIZ6cWebyNy0/eRObpjwdhRLN4EMtsPretc7OD 2D1r64poXUsVqGhrJpvz0WWVeM5x0TNA81W8ww/lzyePN6aAMxwGxChp7qjihoLCtNcP qy7vGF9UcLH3MJ98lF+eSABE2cSB55G7yytAXXnW9kJitM91vX7uTnduVaBfEiaiTBy3 rZ7w== X-Gm-Message-State: AOAM532rh1m278fnhk6d6+flk7l2Wi+R5grAhtzOiz2lk/i3Ozy1fIK/ 7J7MGNi8H2z7S/UDaez5u6SEJVKMglw= X-Google-Smtp-Source: ABdhPJzyA/cefFlLnfqsxPKUzLdK+vgnvaYNMyV9teXSqpJEubg1XFiWqWadfhikYT+A8KyGJB7ZsA== X-Received: by 2002:a05:620a:166d:: with SMTP id d13mr12918879qko.248.1625890870410; Fri, 09 Jul 2021 21:21:10 -0700 (PDT) Received: from M6800.technologist.com (c-98-235-175-95.hsd1.pa.comcast.net. [98.235.175.95]) by smtp.gmail.com with ESMTPSA id a62sm3567101qke.108.2021.07.09.21.21.09 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 09 Jul 2021 21:21:09 -0700 (PDT) Message-ID: <60e92035.1c69fb81.da2f6.8414@mx.google.com> From: Richard Beels X-Google-Original-From: Richard Beels X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Sat, 10 Jul 2021 00:14:37 -0400 To: cygwin@cygwin.com Subject: Re: search and install packages via bash? In-Reply-To: <20210708211451.0007A3888821@sourceware.org> References: <20210708084556.GA7359@tik.uni-stuttgart.de> <20210708141913.GA21966@tik.uni-stuttgart.de> <20210708211451.0007A3888821@sourceware.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2021 04:21:12 -0000 At 07/08/2021 at 17:11, Shakespearean monkeys danced on Richard Beels via Cygwin's keyboard and said: > >2, use fzf. i don't use it (yet?) but it should be something like: I decided to download fzf and play with this since the itch grabbed me... It took all of 5 seconds for me to remember a bunch of packages with a "-" in the name, so came up with this instead: cyginst() { # install cygwin package(s) from the commandline, can't do *-src _pkg=$(cygcheck -p "$1" \ | grep "$1" \ | fzf --multi --reverse \ | sed -E 's_-[0-9]+.*$__' \ | tr '\n' ',' \ | sed 's_,$__') /setup-x86_64.exe --packages "$_pkg" } Since this would whack -src, I tried to figure out how to install just a source package from the commandline to see if this would matter but couldn't figure it out, so I guess the -I option is there for a reason. But I came across a weirdity with setup (2.908). While you can change the mode into download (-D) only or local-install (-L) via commandline, I couldn't figure out how to change it back to "install from the internet" from the commandline. I think there should be a parameter for this, but heck if I I have any idea about C++ (I can barely spell it). At a minimum, it seems that the code currently is in contradiction to the --help output: once you choose -L or -D, that becomes the default mode for subsequent runs. Until explicitly changed back by running setup and clicking the appropriate button on the second dialog. It looks like the "last-action" setting in /etc/setup/setup.rc controls what is used as the default: "Download", "Install" (local install) and "Download, Install" (internet install). The expected behavior would be as the --help output describes. Cheers!