mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-05-25 09:26:04 +02:00
a0c0aa41d2
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.
42 lines
1.8 KiB
Plaintext
42 lines
1.8 KiB
Plaintext
-----------------
|
|
KNOWN BUGS IN ZSH
|
|
-----------------
|
|
|
|
------------------------------------------------------------------------
|
|
The pattern %?* matches names beginning with %? instead of names with at
|
|
least two characters beginning with %. This is a hack to allow %?foo job
|
|
substitution without quoting. This behaviour is incompatible with sh
|
|
and ksh and may be removed in the future. A good fix would be to keep
|
|
such patterns unchanged if they do not match regardless of the state of
|
|
the nonomatch and nullglob options.
|
|
------------------------------------------------------------------------
|
|
It is currently impossible to time builtins.
|
|
------------------------------------------------------------------------
|
|
40106: The comp* completion-related builtins (compadd, compset, etc) are
|
|
run with $_comp_options in effect, rather than the user's options.
|
|
------------------------------------------------------------------------
|
|
users/20807: vcs_info quilt 'addon' mode: hook lookup context specifies
|
|
the underlying VCS but not whether quilt is used.
|
|
|
|
Workaround: test (( ${+funcstack[(r)VCS_INFO_quilt]} )).
|
|
------------------------------------------------------------------------
|
|
41184: 'exec' optimization for last command in a subshell should be
|
|
skipped when STTY=... is set for that command
|
|
------------------------------------------------------------------------
|
|
41203 and others: Make it easier to maintain C modules out of tree.
|
|
(May require defining a stable API for modules, see 41254)
|
|
------------------------------------------------------------------------
|
|
44007 - Martijn - exit in trap executes rest of function (prints "fn2")
|
|
[[[
|
|
trap 'echo $1; exit; echo $2' USR1
|
|
fn() {
|
|
echo fn1
|
|
kill -USR1 $$
|
|
echo fn2
|
|
}
|
|
echo out1
|
|
fn trap1 trap2
|
|
echo out2
|
|
]]]
|
|
------------------------------------------------------------------------
|