zsh-users
 help / color / mirror / code / Atom feed
* parse vs. runtime errors
@ 2018-04-20 18:00 Ray Andrews
  2018-04-20 19:00 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Ray Andrews @ 2018-04-20 18:00 UTC (permalink / raw)
  To: Zsh Users

How come:

[ .... ]]

is only caught as an error at runtime?  The error kills anything 
remaining on the same line, but subsequent linesexecute as normal.  I 
find most errors kill the entire parse, but there are some few that 
survive parse but throw the error at runtime.  Why is that?  It's a bit 
annoying that the runtime error can be buried in output and so not be 
noticed, and it seems like it would have to be an error at parse too.  
Either way, can I ask zsh to always make any error stop everything and 
make itself known?  I'll often do something like:

$ . func-file; func arg1 arg2

... and if 'func-file' has some bug in the contained source of 'func 
()', the older version of 'func' just runs anway and one does not see 
the error messageif the output scrolls off the screen.  True, one might 
not be so lazy and source the file, then run the command, but still it 
would be nice if there was some way of making zsh always stop whatever 
it is doing when any code error shows up.



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

end of thread, other threads:[~2018-04-21  1:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-20 18:00 parse vs. runtime errors Ray Andrews
2018-04-20 19:00 ` Bart Schaefer
2018-04-21  1:48   ` Ray Andrews

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).