zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: ZyX <kp-pav@yandex.ru>
Cc: Zsh hackers list <zsh-workers@zsh.org>,
	Martijn Dekker <martijn@inlv.org>
Subject: Re: Arith parsing bug with minus after $#
Date: Fri, 29 May 2015 14:24:45 -0700	[thread overview]
Message-ID: <CAH+w=7ZGUW-57-HVqy9kAVdH_xysyHvxadPmRyYJq1LTRWWDhA@mail.gmail.com> (raw)
In-Reply-To: <5423831432932500@web1o.yandex.ru>

[-- Attachment #1: Type: text/plain, Size: 557 bytes --]

On May 29, 2015 1:54 PM, "ZyX" <kp-pav@yandex.ru> wrote:
>
> But later it explicitly says that not enclosed in single braces may only
be names or single-character variables. I.e. $#- is ${#}-, $10 is ${1}0, …

Yes, but $#name to return the length of the value of $name is already a zsh
extension, so unless we're in some emulation mode, treating $#- as the
length of $- is perfectly reasonable.

I vaguely recall having a similar discussion about the meaning of $## ...
Related, is ${##foo} parsed like ${#name#foo} with an empty name, or ...?

  reply	other threads:[~2015-05-29 21:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 19:42 Martijn Dekker
2015-05-29 15:02 ` Peter Stephenson
2015-05-29 15:43   ` Martijn Dekker
2015-05-29 18:09   ` Bart Schaefer
2015-05-29 19:33     ` Martijn Dekker
2015-05-29 20:48       ` ZyX
2015-05-29 21:24         ` Bart Schaefer [this message]
2015-05-30 19:24           ` Peter Stephenson
2015-05-30 19:40             ` Peter Stephenson
2015-05-30 22:28               ` Bart Schaefer
2015-05-30 23:30                 ` Peter Stephenson
2015-06-07  1:08   ` 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='CAH+w=7ZGUW-57-HVqy9kAVdH_xysyHvxadPmRyYJq1LTRWWDhA@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=kp-pav@yandex.ru \
    --cc=martijn@inlv.org \
    --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).