Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: export "a=b"=~
- X-seq: zsh-workers 40795
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: export "a=b"=~
- Date: Wed, 8 Mar 2017 13:23:45 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=H3pYWVxA5mvr0mP H2NoIy1b23Wo=; b=fifnvsospMzanDpRC/cnfl9QV4PFAwnvks/MP+lccaJhHrn GQzMg73BnUyGOkxCN9ZR+py1I7gxzbbO+YX3vHyu5oFTJjZHYVfSeP/MEl2YDeiT KX6aACj/mbAUKbuhy/gziH4C8gAfN+Ff7HgUW5FmNAESeh9TVLqZBxndDTvs=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=H3pYWVxA5mvr0m PH2NoIy1b23Wo=; b=C7vNdoFBEAiWdMZb1sTqS7+2sqfVUJ8rkVF2gQQ09jn3hi 8LFHMNmGjmzSammuyhR7alvieUleJqfNl7pexyv06k8utycyA9khed7xV777TL+s 7k8OylME4PnEWnpGbZZQC9xqjAD1fjpxFsJ0SkUdN6Lna0rwfeJaBgW9kKHGY=
- In-reply-to: <20170308085000.GA6975@chaz.gmail.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: <20170308085000.GA6975@chaz.gmail.com>
Stephane Chazelas wrote on Wed, Mar 08, 2017 at 08:50:00 +0000:
> Not that it's likely to ever be a concern, but I just noticed:
>
> $ zsh -c 'export "a"=a=~; echo $a'
> a=~
> $ zsh -c 'export "a=a"=~; echo $a'
> a=/home/chazelas
> $ zsh -c 'export a=a=~; echo $a'
> a=~
>
> (5.1.1)
[ I assume the point is that tilde expansion wasn't expected in the
second case. ]
Same behaviour in latest master. This is because the MAGIC_EQUAL_SUBST
option, even when unset, implicitly applies to "export". (The
declaration of "export" in builtins.c has the BINF_MAGICEQUALS flag
since before CVS.)
Should the behaviour be changed in 'emulate sh' / 'setopt posix*' mode?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author