-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 7/5/12 11:55 AM, Dan Douglas wrote:
>> Remember that my main suggestion is to clearly document the intended >> behavior (see the subject). This could mean to add a generic >> paragraph to the documentation of "set" that describes the scope >> and extent for all options. > > I'm all for better documentation. Scope in Bash is a complex subject. Almost > none of it is documented, and there is little standardization around how > function scope is supposed to work anyway. I'd call set -e a low priority > relative to documenting what scope behaviors are actually in place. There really isn't that much scope. Posix barely acknowledges the existence of scopes, period. It doesn't have local variables, options, or traps. The paragraph in the bash man page describing the behavior of the ERR, DEBUG, and RETURN traps, and the various descriptions of local variables, are about it. Bash's use of dynamic scoping is where the complexity comes in, I think, but the implementation is, I hope, consistent. Chet - -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/1u9AACgkQu1hp8GTqdKs19QCfRvkBQ0rUxgNklTCZYhliQv4j d8MAoIfmHmDq9y3EP3y2wxz0fCshO+bo =EmUI -----END PGP SIGNATURE-----