zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: "Zsh Hackers' List" <zsh-workers@zsh.org>
Subject: Re: Shift arguments
Date: Wed, 31 Oct 2012 09:33:38 -0700	[thread overview]
Message-ID: <121031093338.ZM11762@torch.brasslantern.com> (raw)
In-Reply-To: <20121031150140.32569722@pwslap01u.europe.root.pri>

On Oct 31,  3:01pm, Peter Stephenson wrote:
}
} % integer foo=3
} % set -- one two three four five six
} % shift foo
} % print $*
} four five six
} 
} In other words, if the argument to shift is a parameter that isn't an
} array, it's used to give a mathematical value with which to shift the
} positional parameters.  That seems confusing.

I can't disagree that it's confusing, but the idea is that you can give
any math expression there, e.g. "shift 7-foo" would shift by 4.  This
is in the same category as passing math expressions to "return".

It's always been like that ...


      reply	other threads:[~2012-10-31 16:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20121031134007.GA9731@localhost.localdomain>
     [not found] ` <20121031142546.529e1709@pwslap01u.europe.root.pri>
2012-10-31 15:01   ` Peter Stephenson
2012-10-31 16:33     ` Bart Schaefer [this message]

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=121031093338.ZM11762@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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).