help / color / mirror / code / Atom feed
From: Stephane Chazelas <stephane@chazelas.org>
To: Zsh Users List <zsh-users@zsh.org>
Subject: modifiers applied after e qualifier but before oe?
Date: Mon, 2 Aug 2021 15:42:34 +0100	[thread overview]
Message-ID: <20210802144234.noab4lvp3pvj7ct6@chazelas.org> (raw)

Today I realised that modifiers were applied *before* the
expression in the oe['expression'] glob qualifier was evaluated
(but after the one in e['expression']):

$ echo /etc/issue(e['echo e: $REPLY']oe['echo oe: $REPLY']:t)
e: /etc/issue
oe: issue

Is it as intended? I couldn't find it mentioned in the

Is there a way to change that (for oe to see the original path
without modification by modifiers) within a single glob? I tried:

$ echo /etc/issue(#qe['echo e: $REPLY']oe['echo oe: $REPLY'])(#q:t)
e: /etc/issue
oe: issue

didn't help.

If not, I can always do:

$ () { echo $@:t; } /etc/issue(e['echo e: $REPLY']oe['echo oe: $REPLY'])
e: /etc/issue
oe: /etc/issue

That is move the modifiers out of the glob and apply them to
parameter expansion.


             reply	other threads:[~2021-08-02 14:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-02 14:42 Stephane Chazelas [this message]
2021-08-02 16:27 ` Bart Schaefer
2021-08-02 21:19   ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210802144234.noab4lvp3pvj7ct6@chazelas.org \
    --to=stephane@chazelas.org \
    --cc=zsh-users@zsh.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).