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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21017 invoked from network); 2 Aug 2021 21:20:25 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 2 Aug 2021 21:20:25 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1627939225; b=a1Xhmh6twami8URAaMmlEdbDDC1wJZ8IJi/rMtLrc/UAzOdeAjyIVIb8aaOrR86rAym15tjTzD ZyexE1caFeFZZGFrtTcfHT9UwdiicWUszG70VnseYvbbQquddmdsB5GdMuoQs+YsAPAqd8odM4 ZyYZhQisPVIqE9gBRiYPRZ7gsBwP/pt1cqlVUATmQU6mTKGnOVLnVm2QCq+TkSGoetjGH2u/tr oVINXIarkrhowlXZnJASBrn/joFD90FHbiIvP/EOqFRgg9iagWrp/1qWBpj8LQ7PJdbwpzbh1P HiDX1rcmGyzzS4Jmxshx28T4lgo8y8K5cPgajTayll2eUw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f177.google.com) smtp.remote-ip=209.85.219.177; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1627939225; bh=4Kb5hNyEw4EGLQeEFehetOXdMibRw9CCmeGlDozQJtA=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=bDJ44pUw++8TzsGh5Xop4H6uDABX+dBHsUBgoZQpTq1UEnor3mDBpLzcGnmhmO3mCOXx0M0xY6 3DfsPvhCqmIQH+b7wIyqDEBTNspCMczNdwH5QgikpyGSZzjoiEmh+OYuthXplIZfGFFiXJqlnV eNnVy1UCb6rw2pvve/ofDwlWxQzYdQIltCCKuBPFcyDsXW19dYywQeftWACnb8SINmP+sn5H/g xnWlRNwixIin6L7qTW2VjlI4rVYK5xGAH/7NEVA/qXK22N5U26E9jJfgl/WkSKGBVmXDIyPbWg P2Zr7vADDskvqnkRVxZ1/RSzEwoQY3FPx/m8iJ77oQr1Fw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=YqoPEy4/MSRWczCBbJ0+D+HcCmTY6lSapFaoekCFFJg=; b=dumTPfhn6rEWibMpEATa7zbtig coKcqsunS28sumMwlRViyEShI88vlGFGqCDNSHb1v7dwPa0EVivRX5X+EPoS49o9WKEusSlvNvnQj QjslO9ny7tnW20FBDCSFM61NOBJ3A7TogqVhrgbP8qs+m3WGa3jO0gnvbXVTegUzHP9oekU9dfkUP HcTdZmvVGk77D6pMLJJRK6HpI79ZlirJa24iDjb0NtvDZJwRvX2FWFKetUUU+k6mrttF3CTEWXB3S Ebks4QgLpvgd+yVlRVtLe+xtfUDCvabOQevkC6LMssfD0cQN4ZTtyC9IbXL3/dNgZSLWs95UFmD+C BlYFM/WQ==; Received: from authenticated user by zero.zsh.org with local id 1mAfMG-000K7t-12; Mon, 02 Aug 2021 21:20:24 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f177.google.com) smtp.remote-ip=209.85.219.177; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f177.google.com ([209.85.219.177]:43770) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mAfLW-000JOM-FS; Mon, 02 Aug 2021 21:19:39 +0000 Received: by mail-yb1-f177.google.com with SMTP id z128so4220534ybc.10 for ; Mon, 02 Aug 2021 14:19:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=YqoPEy4/MSRWczCBbJ0+D+HcCmTY6lSapFaoekCFFJg=; b=1Tr1NU5daehe1qe9QTgL7WrlB1ZWGORwt2qpcuN5CbTHqirn+0jQYwkVi9RzWKMjs5 APAqHZlnRXugQdeWnoTZYWzGpB+MMlRkcWd3TbhX9w0+gHT45kpNu+yDqyv422CiaOBA DdhvZ9lN7NhzYjSujkaGQ3JZsdhG5j9cS8n3v6T9Hm3GQql6LSXj3R0C6XIbZM8t/dMS RuVffMGFz15uhhqaY3zoxAP0DuTyaGmDjn4WXuhMJpQQZvbu3f32FlxgV9l14mgiufsB z1YrzL/0Nz7M7JjRwdMcDj4SuV/6928E90KvU51Y5VGW9N4Va5gZaQJ6MPEp718w+YC6 3s2w== 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=YqoPEy4/MSRWczCBbJ0+D+HcCmTY6lSapFaoekCFFJg=; b=gsKBLY6UGOJlkuNmAC9mlvBzQAxESvo+biSueibY4G20BNv+NCnq6+kqime0cn7TUf 1IIjLS3l/566JTjES9h8BpmdrlmS75SJUCdnE+d2Us22wx435PSfCVbFVTpy+YwOa/fh PrPsI+As34gnv2sa5vd2IYKg/MF6XOB6KY90pMB1AR9j66pJG8J8RY288Vp87RZD5erW mnboiIuDGL7XSbUI6ia+KipUOkr+j1fWMsZjSWrxDKuGscW+dcWKMmJBGSDr6USQg3hU RAFdoqDAP5bQRqpueo7KPODNppCos8883QWA/6VGsnc1S0/TnhVpv3Hs9QmnRu0kE96M wjMQ== X-Gm-Message-State: AOAM53190jmu6aAquURSKdMX1lzUTGE0g7IWDT9bDTaUD6bTK72WOOZH 4Nn4/6IsaZZwkqAZg7+0aaxcmKXtUspjUdaDjYX2EM6TwG4= X-Google-Smtp-Source: ABdhPJzBWoHmQuzeCJVg1CXckG4kKC7Z5BTtq/0IQXEDJOiirjE2ImNU40fVhALEQDaV3iFmlALnPPHSEyRFWH8cCAU= X-Received: by 2002:a25:e042:: with SMTP id x63mr24769969ybg.398.1627939176842; Mon, 02 Aug 2021 14:19:36 -0700 (PDT) MIME-Version: 1.0 References: <20210802144234.noab4lvp3pvj7ct6@chazelas.org> In-Reply-To: From: Bart Schaefer Date: Mon, 2 Aug 2021 14:19:25 -0700 Message-ID: Subject: Re: modifiers applied after e qualifier but before oe? To: Zsh Users List Content-Type: text/plain; charset="UTF-8" X-Seq: 26834 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 Mon, Aug 2, 2021 at 9:27 AM Bart Schaefer wrote: > > It's probably intended so that the result of ordering is on the > modified result rather than on the original path. I do find it > surprising that it's not mentioned anywhere, though. I wonder if we need a section on the order of events for globbing, akin to the "Rules" section for parameter expansion. What's going on here is that all of the orderings to be applied to a given filename generation (glob) are collected as the expression is parsed, and then applied at the very end after everything else has modified the result. This is why the doc notes that you can't have more than 12 sort operations on any glob, and it confirms that you can't change what's seen as the incoming value of $REPLY by the 'oe' code block. However, if for some reason you need to do this all in the glob, you could use the first 'e' block to stash a mapping (in a global hash, say) and then look up that mapping in the 'oe' block to set $REPLY for the sort. That means moving the qualifiers into the 'e' block to assign to $reply, but it's all in one glob.