Having reviewed 20076, 20084, 21734, and 21735, my understanding is that
the original intention was:
- A 'return' in a function does run always-list
- An 'exit' outside a function does not run always-list
- A 'return' outside a function is treated as an 'exit'
All of which are the case today. The remaining case, of 'exit' used
inside a function, was not specified by the referenced -workers@ posts;
does, as implemented, run the always-list; and furthermore, based in
21734 it's fair to assume that the original documentation was assuming
that 'exit' would be used outside of any function, just like it assumed
'return' would be used inside a function.
Therefore, have the documentation specify only the behaviour of 'exit'
outside any function, and leave the behaviour of 'exit' inside
a function unspecified. Anyone who relied on the documentation of 'exit'
as documented until this commit would have run into the
documentation/implementation discrepancy described in 45075.
In code such as:
> hobbes% () { for arg do print -r $arg; done; } 1 2 3
> 1
> 2
> 3
the implicit positional parameters added when the `in word ...'
list is omitted also implicitly append the separator term, making
the above code valid, albeit seemingly violating the syntax listed
in the documentation.
This is related to the various forms of alternative syntax and is
the intended behavior of the parsing code, so correct the minor
contradiction in the for loop documentation.
Typeset assignments now work like raw assignments except
for no "+=" and no GLOB_ASSIGN.
Documented in typeset builtin doc and mentioned in release notes.
Tests to ensure basic sanity.
Enabled by default, can be turned off by "disable -r" with typeset
family of commands.
restrict token aliasing (34641) to global aliases; tighten up POSIX_ALIASES to better match spec; update Aliasing doc to cover this and clarify older behavior
2015-03-18 Peter Stephenson <p.stephenson@samsung.com>
* 34723: configure.ac: turn off fixed site function directory if