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

Re: PATCH: "typeset -m" plays havoc



On Sep 14,  8:55pm, Andrej Borsenkow wrote:
} Subject: RE: PATCH: "typeset -m" plays havoc
}
} What happens in case of
} 
} splat() { typeset -F -m \* }

Depending on what stands in for -F, it dumps core.  I just noticed that
myself.

} bor@itsrm2% splat () {typeset cdpath}
} bor@itsrm2% splat
} 
} If I can believe manual:
} 
}      For each remaining NAME that refers to a parameter that is set, the
}      name and value of the parameter are printed
} 
} In our case cdpath is definitely set; but what we get is creation of local
} cdpath.

Which is what must happen, otherwise you can never create local parameters
with the same names as global ones and the whole point of "local" is lost.
Try a similar function in ksh or bash.

} The suggested patch seems to take care of the both. It is on top of Bart's.
} Peter?

No, please don't apply/commit 12806.

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