zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Peter Stephenson <pws@ibmth.df.unipi.it>,
	zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: PATCH: pws-19: minor syntactic innovation
Date: Sat, 29 May 1999 08:31:19 +0000	[thread overview]
Message-ID: <990529083119.ZM27236@candle.brasslantern.com> (raw)
In-Reply-To: <9905231515.AA16080@ibmth.df.unipi.it>

On May 23,  5:15pm, Peter Stephenson wrote:
} Subject: PATCH: pws-19: minor syntactic innovation
}
} Just thought of a trivial way to take a lot of grief out of parameter
} substitution.  This patch makes the following valid:
} 
}   ${${${${(f)"$(typeset)"}:#*local *\=*}%%\=*}##* }

Hooray, hooray, hooray.  About six times a year I try that kind of syntax
(having forgotten it doesn't work), grumble to myself, and do it some other
way.  Thank you.  I always assumed there was some incredibly hairy parsing
thing that had to be done to consume the quoted string at that point.

} replacing the equivalent but grotesquer
} 
}   "${(@)${(@)${(@)${(@f)$(typeset)}:#*local *\=*}%%\=*}##* }"

Perfect.

I'm tempted to try something similar in 3.0.6 ... except because of this:

} Since you got nothing when you did that before, I don't see how it can
} break anything.  The key point is that quotation of a substitution is
} already tested for by looking at whether it begins with a quoted $, not by
} whether the parent substitution is quoted.

If I put this patch of yours into 3.0.6, will it behave differently than
it does in 3.1.5 (e.g., because of the mult_isarr change)?  If so, I think
I'd rather not introduce differing new behaviors in the two branches.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


  reply	other threads:[~1999-05-29  8:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-23 15:15 Peter Stephenson
1999-05-29  8:31 ` Bart Schaefer [this message]
1999-05-31 22:41 ` Bart Schaefer
1999-06-01  6:23   ` Andrej Borsenkow
1999-06-01  8:21     ` Peter Stephenson
1999-06-01 12:52       ` Andrej Borsenkow
1999-06-01  9:56   ` PATCH: pws-19: document " Peter Stephenson
1999-06-01 17:44     ` Bart Schaefer
1999-06-02  8:03       ` Peter Stephenson
1999-06-02  8:44         ` sh compatibility " Andrej Borsenkow
1999-06-02  8:30           ` Peter Stephenson

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=990529083119.ZM27236@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=pws@ibmth.df.unipi.it \
    --cc=zsh-workers@sunsite.auc.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).