zsh-workers
 help / color / mirror / code / Atom feed
From: "Rocky Bernstein" <rocky.bernstein@gmail.com>
To: "Bart Schaefer" <schaefer@brasslantern.com>
Cc: "Zsh hackers list" <zsh-workers@sunsite.dk>
Subject: Re: PATCH: skip command from debug trap
Date: Wed, 6 Aug 2008 10:30:14 -0400	[thread overview]
Message-ID: <6cd6de210808060730q3ebdc5cdt71b381f861ff0fa1@mail.gmail.com> (raw)
In-Reply-To: <080806072236.ZM14655@torch.brasslantern.com>

On Wed, Aug 6, 2008 at 10:22 AM, Bart Schaefer
<schaefer@brasslantern.com> wrote:
> On Aug 6, 10:47am, Peter Stephenson wrote:
> }
> } An option to "return" is quite tempting.  This separates out this behaviour
> } from any other.  It removes any reliance on obscure numerology. It makes it
> } quite explicit this particular mechanism is in use.  Currently return
> } doesn't take options at all, so the result is also completely compatible
> } with existing versions.
>
> Umm, the argument to return is interpreted as a math expression.  So for
> example
>
>        x=-3
>        return -x
>
> returns "3", and
>
>        x=3
>        return --x
>
> returns "2".  How are you going to make any kind of option parsing for
> return behave compatibly with that?

How about "return $((x))", or "return $((-x))"?


  reply	other threads:[~2008-08-06 14:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-05 14:27 Peter Stephenson
2008-08-05 15:50 ` Stephane Chazelas
2008-08-05 23:47 ` Rocky Bernstein
2008-08-06  9:47   ` Peter Stephenson
2008-08-06 14:22     ` Bart Schaefer
2008-08-06 14:30       ` Rocky Bernstein [this message]
2008-08-06 14:59       ` Stephane Chazelas
2008-08-06 15:34         ` Peter Stephenson
2008-08-06 17:00     ` Rocky Bernstein
2008-08-06 17:54       ` Peter Stephenson
2008-08-06 19:09         ` Rocky Bernstein
2008-08-06 19:49           ` Peter Stephenson
2008-08-07  1:00             ` Bart Schaefer
2008-08-07 10:11               ` Peter Stephenson
2008-08-07 14:52                 ` Bart Schaefer

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=6cd6de210808060730q3ebdc5cdt71b381f861ff0fa1@mail.gmail.com \
    --to=rocky.bernstein@gmail.com \
    --cc=schaefer@brasslantern.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).