* MAGIC_EQUAL_SUBST
@ 1999-02-15 17:23 Peter Stephenson
0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 1999-02-15 17:23 UTC (permalink / raw)
To: Zsh users list
I'd like to change the behaviour of the shell option MAGIC_EQUAL_SUBST in
a way which I think will make it more comprehensible and so useful, but I'd
like to check no-one is relying on the old behaviour.
The option is supposed to make arguments looking like assignments get ~ and
= substitution, just like a real assignment would (the argument is still
otherwise a normal command argument, however). The current behaviour is:
% unsetopt magicequalsubst
% print foo=~/a:~/b --foo=~/a
foo=~/a:~/b --foo=~/a:~/b
% setopt magicequalsubst
% print foo=~/a:~/b --foo=~/a
foo=/home/user2/pws/a:/home/user2/pws/b --foo=~/a
The special behaviour only happens when the first thing looks like a
variable name. This was my idea and I think I got it wrong: the shell
shouldn't second guess what an assignment for an external program looks
like.
So I'd like to alter it to make it more consistent --- this only affects
the behaviour with the option set, of course:
% print foo=~/a:~/b --foo=~/a
foo=/home/user2/pws/a:/home/user2/pws/b --foo=/home/user2/pws/a
This will make it useful in things like `./configure --prefix=~' which I
should probably have thought about originally.
Is anyone likely to be upset by such a change?
--
Peter Stephenson <pws@ibmth.df.unipi.it> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-02-15 17:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-15 17:23 MAGIC_EQUAL_SUBST Peter Stephenson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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).