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

Re: New problem with ERR_RETURN ?



On Wed, Dec 7, 2022, at 12:07 PM, Peter Stephenson wrote:
> @@ -1772,6 +1775,12 @@ function, code inside it is considered 
> separately: it may force a return
>  from tt(summit) (assuming the option remains set within tt(summit)), 
> but
>  not from the enclosing context.  This behaviour is different from
>  tt(ERR_EXIT) which is unaffected by function scope.
> +
> +It should also be noted that this option forces an immediate
> +return to the command prompt when the non-zero status occurs
> +in a sequence of commands typed on the command line.  In other
> +words, the sequence of commands typed by the user may be
> +thought of as a function for this purpose.
>  )
>  pindex(EVAL_LINENO)
>  pindex(NO_EVAL_LINENO)

Bikeshedding perhaps, but this sentence already exists just above:

	This will trigger an exit at the outermost level of a
	non-interactive script.

Maybe any new text should come right after this?  That would keep
the explanations about how ERR_RETURN affects behavior at the top
level in one place.

-- 
vq




Messages sorted by: Reverse Date, Date, Thread, Author