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, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3801 invoked from network); 21 Apr 2022 18:52:28 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 21 Apr 2022 18:52:28 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1650567148; b=VFVkW9suJkX0tuZGYLr0lSol2XhIiip8YevOZlKTaTL6NXH1cGaQE3nevHyU9i7Esq7nK752UT /x8trNuT7MREbKiCFljc1wY+QeJkBT/0FBh1oYd/6dbmPcmJMch/MB2MkfVpr/vddSBQownzSM RxNglaRvpKLqQt5BCttrEopPvnX9UWzgSlggZXe6Da5Dd94Bpr5X1q2yHT3ZXQ1Z5GMRtEpz3R KWIVff/L7BAelJ2ekmUE1TXVduf7HKXPegSBDpfY5DRfxSR8RoNyXHh+uXZaDXd+LwLg6ZxgXj Agr9bWi2Fb1qUaTkDPzFVdbHXLIjMbwION8csTTyaj9pRg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-pg1-f182.google.com) smtp.remote-ip=209.85.215.182; 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=1650567148; bh=AhyrFYM8y602fHYcPZ2ikDFvPqMj6p/PLOqnR+WHMLk=; 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:References: In-Reply-To:MIME-Version:DKIM-Signature:DKIM-Signature; b=ZpWBGK9vrmbgBgGaY4IPP4H5Pa5pQ97dQrCcqfuz/cBEaSo6eD2Wg7h4rA+msuCowOHdRu6v5K V3Lbx4tTiyt3J/Bxnfy20SY2D+H84gsGDmQ9Eg1kjU6wLXz1CD/+J4uW93yJAxsOEjUDc5ETFg vPKSYutdyqJ6anhlDEoJch0ENIlI7unHC+WBX2era91IgJWuFG36rMdQapCCyYB6ShlmkYwjzC rEkseHW6scqStjtnZInogS0tWnErIQ8UO+i3H4R/1FKn5zRrUDLoRj/z+AvoRdbiVRbqYQKmft wwLqx7kxLmhiEkiaisvrifvFqzGYudNq5XmFpmxltn0AYw==; 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:References:In-Reply-To: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=OmwdmVGD+XeJCrvXaeBRDephS1sTXTFBG+pVejPcymg=; b=A5rFjPdpgkxBT23VzVf1oktwCY BEwR+NWAa+oTlLM0NZjyTmH5Yj2Ixmao695yWod0kTsYu/bTbNgXYvDUOWsWw9gpYTHumas5TKVWK zpoRGKRaOLi/iwx0sB6Tt/SCx2Oa0yKleLDACy15kqtaMYxS+S39mJjggcrv1FDBIK9vuKybtUwz8 F+xmVY4dW47UNz216UMd3Rwpv310QjRwR1ttnZsAUKCtrJamxJNyxyJxE3wwXUTrhTHbrAIExRRT/ 1uJURpRatgk23BA3QoxiQxplT5a4aWhE2wwJ2QaBgNPS1G0A1ybfAW2Ckq+0/qVgorAgqHOu97NGJ sx5x7IVA==; Received: from authenticated user by zero.zsh.org with local id 1nhbum-0006G4-8V; Thu, 21 Apr 2022 18:52:28 +0000 Authentication-Results: zsh.org; iprev=pass (mail-pg1-f182.google.com) smtp.remote-ip=209.85.215.182; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-pg1-f182.google.com ([209.85.215.182]:33431) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1nhbtd-0005XN-9q; Thu, 21 Apr 2022 18:51:18 +0000 Received: by mail-pg1-f182.google.com with SMTP id k14so5424242pga.0 for ; Thu, 21 Apr 2022 11:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=OmwdmVGD+XeJCrvXaeBRDephS1sTXTFBG+pVejPcymg=; b=kJq+w7qRd1g+YTJ7X2WYO2BH1MVgCUFPiDqsDXwplyYsIv6oQjsdgnkDsLsaheInQe AIVR1JVsJCtsBTdkDwiF0c1MLpE3JGFmZVOOgzU3Krbi0NvmKcY21ubaX7d+70I0X1mS izRLOQCMGDU/mO5TKENMiLv8kt5kNHipzSKieDgsIHrMfeAkausLWBfLaNUdNDa6Vd5L BadiVxkIlVLS+NFOWrTA3+j89KyWKlsIveG4XSlliulbt0MFo9v255dJV3c7HXnmWPol 50mSXHavvUszmBygOPRxcNlycW5z9zN3kH6jVBWw7sUD5gqTi+10R06qbrNtUpK68GbF AlPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=OmwdmVGD+XeJCrvXaeBRDephS1sTXTFBG+pVejPcymg=; b=y2B8RBE4JOb4Bg0jSPcrW7P1srhudowvqlz/cK1RX4h41SR5+oBPlcH+EFHI2nZ2vV nmjyOAhPBznL83WJ2867RtDaiYh4reIihzA/dqpVF12SL2in2uIcg9GSE+SPK7uWUnQv 2uEhY4+Bbk+fVXNks/cTgI+vQSriEgrLaV3tApAuayf14rZRqaw2D556Ue0w4jcDTNG0 quuougXG47BviiJW5V0rDw7DdbVF52+EtTz+/X9qvPHm/apWMO9thIHuAmfyJlDQyp7e 94RmJ3iH1BMxGQciy3e9M3wd5DA5Q/P48PzZquHLh+t6ATVFKd7GH/UXhXleSHNW5QtJ V0SQ== X-Gm-Message-State: AOAM530P/go1i5TIgZcrJD3xyapOPSWE5/2yMBBVye5zlYDTO5OWq4Fz URfTwjhFiohslCpi6nhFhggmEGSa2vZkhJZ4N/XomL9p X-Google-Smtp-Source: ABdhPJyP3lxYwwGwpy6iJiVEQLAdwRAgxldlWtLZ5s87Fhak9leyC0R5KXtJUdJrxFjpjR/AREcQSNZ2WplMdfa8CS4= X-Received: by 2002:a05:6a00:2292:b0:50a:6683:44a5 with SMTP id f18-20020a056a00229200b0050a668344a5mr1060503pfe.16.1650567076018; Thu, 21 Apr 2022 11:51:16 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6a10:d5a5:0:0:0:0 with HTTP; Thu, 21 Apr 2022 11:51:15 -0700 (PDT) In-Reply-To: References: From: Mikael Magnusson Date: Thu, 21 Apr 2022 20:51:15 +0200 Message-ID: Subject: Re: glob inside nested parameter expansion returns glob string To: linuxtechguy@gmail.com Cc: zsh Content-Type: text/plain; charset="UTF-8" X-Seq: 27685 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 4/21/22, Jim wrote: > Hi, > > The following two statements produce the expected results: > > % A=(${:-.z*(.N)}) > % A=(${A:#*(comp|hist)*}) > > When trying to nest the two, the result is the glob statement: > > A=(${${:-.z*(.N)}:#*(comp|hist)*}) > > Trying to understand why this is the case. Could someone explain why this > happens? > Is there a way to nest the two? There is a certain order that parameter expansions and globs happen relative to eachother, nesting param expansions does not change the order of processing. Eg, there is not really any way you can process .z* before the outer :# happens, which will operate on the pre-expanded string in your final combined statement. In short, no(t as far as I know). -- Mikael Magnusson