zsh-workers
 help / color / mirror / code / Atom feed
From: "Rocky Bernstein" <rocky.bernstein@gmail.com>
To: "Zsh hackers list" <zsh-workers@sunsite.dk>
Subject: skipping assignment and function statements; Interactive comments
Date: Sat, 23 Aug 2008 00:15:31 -0400	[thread overview]
Message-ID: <6cd6de210808222115x56de11bdv957bb8cc21358789@mail.gmail.com> (raw)

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.


             reply	other threads:[~2008-08-23  4:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-23  4:15 Rocky Bernstein [this message]
2008-08-25 17:22 ` Peter Stephenson
2008-08-26  2:59   ` Rocky Bernstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6cd6de210808222115x56de11bdv957bb8cc21358789@mail.gmail.com \
    --to=rocky.bernstein@gmail.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).