zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: "typeset -m" plays havoc
@ 2000-09-14 15:42 Bart Schaefer
  2000-09-14 16:55 ` Andrej Borsenkow
  0 siblings, 1 reply; 10+ messages in thread
From: Bart Schaefer @ 2000-09-14 15:42 UTC (permalink / raw)
  To: zsh-workers

Don't try this:

zsh% splat() { typeset -m \* }
zsh% splat

The result is that all non-readonly/non-special parameters get stomped on,
which leaves zsh in a pretty sorry state.

The behavior up to 3.1.5 or so was that `-m' implied the equivalent of `-g',
so I think the following is the most expedient patch.  Peter?

Index: Src/builtin.c
===================================================================
@@ -1942,6 +1942,7 @@
 
     /* With the -m option, treat arguments as glob patterns */
     if (ops['m']) {
+	on &= ~PM_LOCAL;
 	while ((asg = getasg(*argv++))) {
 	    LinkList pmlist = newlinklist();
 	    LinkNode pmnode;

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2000-09-18 15:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-14 15:42 PATCH: "typeset -m" plays havoc Bart Schaefer
2000-09-14 16:55 ` Andrej Borsenkow
2000-09-14 17:35   ` Bart Schaefer
2000-09-14 18:20     ` Bart Schaefer
2000-09-15 16:35       ` Bart Schaefer
2000-09-15 17:36         ` Andrej Borsenkow
2000-09-15 18:46           ` Bart Schaefer
2000-09-17  3:53             ` PATCH: "typeset +m ..." and "typeset +g -m ..." Bart Schaefer
2000-09-18  8:40           ` Parameter aliasing? RE: PATCH: "typeset -m" plays havoc Andrej Borsenkow
2000-09-18 15:45             ` Bart Schaefer

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).