Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ksX-Mailer: MH-E 8.6; GNU Mailutils 3.2; GNU Emacs 24.5.1
- X-seq: zsh-users 22880
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: ksX-Mailer: MH-E 8.6; GNU Mailutils 3.2; GNU Emacs 24.5.1
- Date: Sat, 9 Sep 2017 22:08:11 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=WS/BALLKyEGcOgxe5Hqk/iWLQwgfDSCYmonVtQbUNL8=; b=HgDbwBPbTt8uI1ODp75a9EgLW/1udXxSefyZwrwQ/n7zkUHsp1bMnR/wSZ3OrQBNj2 NoxJYpTT+V7hDg0VxyvqhWU0s+kT7wGrgjxRW1inJguWEyo2BS9HXJ9uM+Dpc8fDYeKv wMtjv0ZsLb3EpnrUgDXKq0UPOeJOd7LhTb8yexN/GNhHB3YtbBvHop8luiIWvrbFkBd3 jB+248lI76obi4K4E5vud+6s0YpIXojY1H8vEhx3ldRVSzBR5qenicz0AiqrAlTY5Vli 1AOQ2FdIQgni1IurB855IyjMZwkbpyOy/hnJEA5CfbdRyrMO0maQFrNHS4pBhYInPKVw woQg==
- In-reply-to: <20170910015141.GA12309@tower.spodhuis.org>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20170909170037.5276@sparky> <20170910015141.GA12309@tower.spodhuis.org>
On Sep 9, 9:51pm, Phil Pennock wrote:
}
} On 2017-09-09 at 17:00 +1700, jdh wrote:
} > Is this a a feature or a bug?
}
} Both, I think?
Well, not exactly.
} It's because those are pattern characters, thus the `*` matching the
} first item and returning `1`. So I'd _expect_ that using the `e` flag
} too would resolve it, but it only fixes two of those.
Hrm. The doc explicitly says:
... To match the value
of a parameter literally in a reverse subscript, rather than as a
pattern, use `${(q)NAME}' (*Note Parameter Expansion::) to quote the
expanded value.
However: All that the (e) flag actually does is untokenize() the
string that was previously tokenized for the (i) flag. The string
is still thereafter passed through patcompile() and matched as a
pattern against the value.
Interestingly,
torch% print $chrtab[(i)#]
1
torch% print $chrtab[(ie)#]
5
I don't know why a pattern consisting of an UNtokenized "#" compiles
into something that _doesn't_ match a literal "#".
Messages sorted by:
Reverse Date,
Date,
Thread,
Author