zsh-workers
 help / color / mirror / code / Atom feed
* skipping assignment and function statements; Interactive comments
@ 2008-08-23  4:15 Rocky Bernstein
  2008-08-25 17:22 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Rocky Bernstein @ 2008-08-23  4:15 UTC (permalink / raw)
  To: Zsh hackers list

I just added a skip command to zshdb (and committed to github), but it
seems that assignment statements and function definitions are not
really skipped.

Consider this example which is slightly modified from the regession
test that was put in when it was implimented:

  setopt localtraps localoptions debugbeforecmd
  trap '(( LINENO == 4 )) && setopt errexit' DEBUG
  x=three
  x=four  # Statement is supposed to be skipped
  print $LINENO five
  print x is $x

The output I get is:

  5 five
  x is four

And if the statement were a function definition, e.g.
  x() { return 4; }
I think x would get defined as a funciton

- - -
In tracking something else down I read this in zshoptions under
INTERACTIVE_COMMENTS:

   "Allow comments even in interactive shells".

I find this phrasing a little weird as it It seems to imply that one
never would want to write a comments, but sometimes one has to break
down and do it in an interactive shell. :-)

Perhaps the word "even" should be removed.


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

end of thread, other threads:[~2008-08-26  2:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-23  4:15 skipping assignment and function statements; Interactive comments Rocky Bernstein
2008-08-25 17:22 ` Peter Stephenson
2008-08-26  2:59   ` Rocky Bernstein

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