From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21733 invoked from network); 16 Sep 2022 07:58:55 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 16 Sep 2022 07:58:55 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1663315136; b=djgT3sS0/XoeljtOgOPqmHqDE/VgQjASQtcAVBTk6KpmPsqFPuY+Nn3Oi0U2X9NBtl6tx08B11 NcZxCtsjZV0xAav8tCrDplG8MYmIKJ6eD+zY54p6E8H3cnRhpiG9+AVVKWB/4HtRzjNTdhnduz 7jLt5wtrpYJVSOWdoqnUo2a5znHxFsoGaYtIX3f78q9y39N+b7WdbCvj7a2pJKm9wJso4rXWjK E+azDuvmVjmnhCw7ZLrhHHpZER8WsEdMaW/B3/ypn0S368SyW0Q3ScNyEcdIO2qp76Zg1SRSNs 5rGsUVLYiJRm6om2VxHGsjqeKL+mhWlFQ3VdDJGDjagLhQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yw1-f180.google.com) smtp.remote-ip=209.85.128.180; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1663315136; bh=PxpJ/6gLaJ1LnPUcGliPE3l0qLN1X2r3OLf6qYvd5qs=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=UMqLVT+OqNkyK8XZtV35T+kCa8sh8ZEkHw+Tg6A+kGi8eCxb8XIvv9HzSkkTLqUOvc8crIxQZM 8kQvvIfsWfAhAoXJ/toXJIpVH2F1su4e36l2o1BlnGD9o/MK377p/hdCPiYuwW0Qckyygm6KiQ VnWby8jf/wRnkwjBUA3wrUBppYSzgHQ5mSe/g/fcvalp9l8yFzADCzrYOvzk5aXy/ioTbYx9cf cF5XILrDNbP4ymc82tLnBnuGSNICwz91sHOm+yfMv8VZLIPnbJ/qzi0tPspNTAplwTgEmX7y2I L+H+hcS35gs8CeFYwEIbTOc6Nui3aR2cOcU5sWj07QHYvg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=PxpJ/6gLaJ1LnPUcGliPE3l0qLN1X2r3OLf6qYvd5qs=; b=aUkmR2o3y47QK7IFbdTN4ssRHS EgPVrYNwOpwmdXyNJpkAEy9Gr6w7oElz6SPWvTeYPem6MbAn6ixe0n8mghBrS9Vg59uLzVSvO7uYd czQgPPKEGQpX4hu78vo7Hjq5feQzmQBeYilFmzdFss2a0zxMT2r0RzY/lq1WQoFtN/EqnXaAqkwya +3I91zNdTCP2njhEPQv+Dk9crYJO9Pi53I15/Osq8xIPEGbniTjm92owziJSre/WNVKtCRXdMfyQz WY85XbyVqGq3bT3CYaP1M2uXsan2jHNOgkjXTsffZupnPOubKx07PGMR+tJn83iZsnVC0LSSQ/t+f 0BGNxgFQ==; Received: from authenticated user by zero.zsh.org with local id 1oZ6FT-00037L-Mb; Fri, 16 Sep 2022 07:58:55 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yw1-f180.google.com) smtp.remote-ip=209.85.128.180; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-yw1-f180.google.com ([209.85.128.180]:33321) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1oZ6Dr-0002LY-Vv; Fri, 16 Sep 2022 07:57:16 +0000 Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-3457bc84d53so250812267b3.0; Fri, 16 Sep 2022 00:57:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=PxpJ/6gLaJ1LnPUcGliPE3l0qLN1X2r3OLf6qYvd5qs=; b=qIppX96n5HoqfLDAia770BsrwEU+C63w2LSXptgrdNrQvXIbqHrk/de9jA5C/ORr/R Vv9sBDwssctnOSAeoWo5Xs7iQgu7XRDoyPRIkq4CyW1huQB9fREN7jYZ2MemjGmu+zaT k3/fXP32k8BDW1vFgkky9ipeE/zE/W2aoUd3jqqqcH+2SHwBHpokd36n30mbiDCIs9UJ L2mKYWF1dnPraca+kJvhHKl0ie+3x42H9eHpaYwnywSlYp/2tGBnIPnwaS1NZ+QrTY7a FxMGdoIMHExrkOi5mFjK+QOkS9gzpdH7f2MGB4Ld5quwb5qIJOUetEDmA3mLQlmkHJNB t6Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=PxpJ/6gLaJ1LnPUcGliPE3l0qLN1X2r3OLf6qYvd5qs=; b=toR7Ewhi4lrg/RvhFodBjdaXbV5rbBJLiJ3KbFczjarcaylVZ0unuIJ3zH6FVH400j ELy1gnNEpMamtLnSt+sftBGfEBjRQlKvXXOQva+/V+GxPn/byhP34ImAdr/XT93b5ocY aAyVFPNCTW8nSgc+qmyiOzfX4dUO7aXOv+tWXJ/WCI8T9OkZtBryIHTL1i5NkJZo3/1l tuhag2RnxWvttXH8baBD2JWM7TqP5CoL/GCrz72PokmNw1PDH10Y/Dql/4URuIfq4Qal tB/aB9o20M0iCAH59lAwsPIY66aqiyRN2BWL1nQn69XeRbxqhF5+mprpRR44W4FIOGE7 +ISg== X-Gm-Message-State: ACrzQf0h1DgOynci4Gw+AN3q3ksyOnbEDOHqUPWSEOkYkhUhPPccFkzg Pf6wlTXnayt95BenQxIwEsKCDvA5fd2ardqx3ByHjlei X-Google-Smtp-Source: AMsMyM6CBOa2K0YUxgGfgVqnJ9xzkgtX8d5UPC+RmS/yyTkVAuBvVjb5Ay/Vb0W5UtsaSJis3IO9ACvG7bBCvLvLgNU= X-Received: by 2002:a81:80c4:0:b0:349:9cba:1a3c with SMTP id q187-20020a8180c4000000b003499cba1a3cmr3446576ywf.57.1663315034923; Fri, 16 Sep 2022 00:57:14 -0700 (PDT) MIME-Version: 1.0 References: <4844b850-2ca6-4c90-95ae-aae00dc339cf@www.fastmail.com> In-Reply-To: From: Roman Perepelitsa Date: Fri, 16 Sep 2022 09:57:03 +0200 Message-ID: Subject: Re: Substitute the last match of a pattern during parameters expansion. To: Michele Venturi Cc: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= , Bart Schaefer , zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" X-Seq: 28092 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Fri, Sep 16, 2022 at 9:52 AM Michele Venturi wrote: > > On Fri, Sep 16, 2022, 08:37 Roman Perepelitsa wrote: > >> On Fri, Sep 16, 2022 at 1:29 AM Michele Venturi wrote: >> > >> > So what is your suggested solution? >> >> Depends on the problem. > > > The problem is extending the (I) flag of parameters > expansion in ZSH to the negative numbers as I said. That's the problem (or rather a suggested solution) on the subject matter. I was commenting on the problem on the meta level. In any case, I think we've exhausted this topic. Roman.