From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15034 invoked by alias); 12 May 2011 10:11:03 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29237 Received: (qmail 26811 invoked from network); 12 May 2011 10:11:01 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110512031050.ZM25147@torch.brasslantern.com> Date: Thu, 12 May 2011 03:10:48 -0700 In-reply-to: Comments: In reply to Mikael Magnusson "Re: PATCH: expanding parameters like echo/print builtins" (May 11, 7:43pm) References: <1305118971-25617-1-git-send-email-mikachu@gmail.com> <20110511172114.56080d04@pwslap01u.europe.root.pri> <20110511180748.18f4e67e@pwslap01u.europe.root.pri> <20110511182657.2d1d99ae@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: PATCH: expanding parameters like echo/print builtins MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On May 11, 7:43pm, Mikael Magnusson wrote: } Subject: Re: PATCH: expanding parameters like echo/print builtins } } What I meant was that the relation between V and g:: isn't documented, } but yeah, I did miss the whole list :). Here's a patch, minus the } renumbering of subsequent items. Renumbering the subsequent items is a nasty bit to leave out, because there are cross-references among the items that always get forgotten; I just fixed all of those up a few months ago. It might be better just to add this to item 12 rather than introduce a new number. } Any better names than echo-type expansion? :) Elsewhere these kinds of things are referred to as "escape sequences" but then so are %-dohickeys for prompts. Probably would have been a good idea years ago to refer to the % forms as "expandos" or some such word ... But, given that they're all escapes, we could go with item(tt(12.) em(Escape sequence replacement))( First any prompt-style formatting from the tt((%)) family of flags is applied, then any replacements from the tt((g)) flag are performed. ) The (g) stuff usually involves making the string *shorter* so to call it an "expansion" is a bit odd. [Is there a potential conflict where (%) inserts something that (g) then incorrectly replaces, if you use both of them togher?] --