Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [bug] sh: tilde expansion after field splitting
- X-seq: zsh-workers 41829
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [bug] sh: tilde expansion after field splitting
- Date: Sun, 8 Oct 2017 20:20:32 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1507490434; bh=heOTGnt6igZ1BB/m5xePt+8PHFsorw9d7ciyz1beZDs=; h=Date:From:To:Subject:In-Reply-To:References; b=WhVhVSPI5pWd1cH5TfkIspq/wTKuSJCa7vzzOT9NxtukFyLgBK2OBC7uEAxxAOQij uZjoPBgugzdEW4v1x8fs/+d6EFA8Nee3RBBiCvVu+F0RmjrRwS6LD81THFLIlhNBIb Sln/3SmB0oqXYFR7A0Rv4CkDuBvaFOSw002qcWbXaeHLH0SWiVEpCfxSo6T1jXGxDo UdV4fJorsoyPKC+SDd+toiRltPTG70bDvBvPRN1vMNxAL+KlHx3WjqoiFBUKsvytsF yxwrHhg+qu9IuIl9PjFA6blrt/2Rxcgzbf/EnlMkskI4abpVkh8mM40itMYFW6eRgw CGlOqvk4SvB9Q==
- In-reply-to: <171008005347.ZM1177@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <06fb6a91-6766-bbd7-9543-cbafe704ee59@inlv.org> <171008005347.ZM1177@torch.brasslantern.com>
On Sun, 8 Oct 2017 00:53:46 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Oct 5, 12:20am, Martijn Dekker wrote:
> } Subject: [bug] sh: tilde expansion after field splitting
> }
> } POSIX says tilde expansion should be done before parameter expansion [...]
> } zsh did this correctly up to version 5.0.8; as of 5.1, it appears to do
> } tilde expansion *after* field splitting, and only from the second field on.
>
> The patch below fixes this, I believe.
Good, it sounds like the effect of the chunk you previous identified as
related was simply moving the linked list node on as a side effect, or
something like that.
> - There either isn't a Test/ for the keyvalpairelement() case in the
> first hunk below, or it isn't rigorous enough, because I initially
> forgot the incnode(node) in that hunk, yet the shell did *not* go
> into an infinite loop during "make check", nor did any test
> fail
That doesn't make sense. This is the only place where key / value pairs
are handled and they require some sort of loop increment to work at all.
You're basically claiming they only work by magic.
> - Should we be testing isset(SHFILEEXPANSION) directly here, or ought
> it instead be [for example] passed in the flags? Is it possible
> that stringsubst() [second hunk] could toggle the setopt so that
> the isset() in the third hunk inverts sense? Of course if that IS
> possible, then the ultimate effect might be the expected one, and
> this point is moot.
I can't believe this is a big deal.
> - Grepping Test/* doesn't find anything for SH_FILE_EXPANSION (in
> upper/lower, with/without underscores, etc.). Did I miss it?
> Does the test for the case in this thread belong in D04parameter
> or E01options?
Assuming SH_FILE_EXPANSION predates the test suite, I wouldn't be
surprised if it's missing.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author