Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: += parameter assignments
- X-seq: zsh-workers 16356
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Borsenkow Andrej <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- Subject: Re: PATCH: += parameter assignments
- Date: Mon, 17 Dec 2001 12:28:53 +0000
- Cc: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <000001c186f3$f4b82bd0$21c9ca95@xxxxxxxxxxxxxx>
- Sender: kiddleo@xxxxxxxxxxxxxxxxx
Borsenkow Andrej wrote:
>
> > One possible extension beyond what ksh does would be to also add a -=
> > assignment. It could be made to prepend to string and array values
> I would prefer += and =+ but that probably breaks ksh93 compatibility.
This issue wouldn't be ksh93 compatibility so much as backward
compatibility with old zsh scripts or any other scripts.
% a-=val
zsh: command not found: a-=val
% a=+val
% echo %a
+val
With `-' (or `+') not being legal inside identifiers -= only affects
anyone who happens to have a command with `-=' in its name - that should
be fairly rare. Affecting any script that assigns a variable with `+' as
the first character is much more likely to matter (a quick grep shows
two cases in the completion functions).
Do any other languages use `=+' as an operator. Anyone else have any
views on it?
Oliver
_____________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp
Messages sorted by:
Reverse Date,
Date,
Thread,
Author