zsh-workers
 help / color / mirror / code / Atom feed
* { exit } always { foo }
@ 2019-12-18  3:56 Daniel Shahaf
  2019-12-18  4:54 ` Bart Schaefer
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Shahaf @ 2019-12-18  3:56 UTC (permalink / raw)
  To: zsh-workers

The documentation of the try-always construct says:

    An tt(exit) command (or a tt(return) command executed at the outermost
    function level of a script) encountered in tt(try-list) does em(not) cause
    the execution of var(always-list).  Instead, the shell exits immediately
    after any tt(EXIT) trap has been executed.

However, A01grammar.ztst expects the always-list to be run:

  723	  (
  724	  mywrap() { echo BEGIN; true; echo END }
  725	  mytest() { { exit 3 } always { mywrap }; print Exited before this }
  726	  mytest
  727	  print Exited before this, too
  728	  )
  729	3:Exit and always block with functions: simple
  730	>BEGIN
  731	>END

Which is correct, the manual or the test?

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-12-19 16:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18  3:56 { exit } always { foo } Daniel Shahaf
2019-12-18  4:54 ` Bart Schaefer
2019-12-18  4:59   ` Bart Schaefer
2019-12-18  5:23   ` Daniel Shahaf
2019-12-19 15:28     ` Daniel Shahaf
2019-12-19 15:37       ` Peter Stephenson
2019-12-19 16:05         ` Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).