Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug#101523: zsh segmentation fault



On Jun 20, 10:51am, Andrej Borsenkow wrote:
} Subject: RE: Bug#101523: zsh segmentation fault
}
} >     local orgargs="$@"
} >
} > This will almost certainly not do what is wanted; it'll set orgargs to be
} > $1 and will make local variables whose names are the rest of the
} > arguments.
} 
} This is related to export foo=$(cmd) problem we have discussed. Obviously,
} other shells treat {export|local|typeset} foo=bar w.r.t. word splitting
} exactly the same as foo=bar, i.e. they do not split in assignments here.

I don't doubt it, but as you pointed out yourself the POSIX-defined
behavior is to split the arguments of those commands.  If the authors
of shoop, whoever they are, want it to be portable, they should be
avoiding this conflict.  It's easy enough to use

	local orgargs="$*"

instead.

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



Messages sorted by: Reverse Date, Date, Thread, Author