zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Peter Stephenson <Peter.Stephenson@csr.com>
Cc: zsh-workers@zsh.org
Subject: Re: PATCH: expanding parameters like echo/print builtins
Date: Wed, 11 May 2011 18:38:46 +0200	[thread overview]
Message-ID: <BANLkTika_BsgGtp73S2wreZjSUoRPTAx3A@mail.gmail.com> (raw)
In-Reply-To: <20110511172114.56080d04@pwslap01u.europe.root.pri>

On 11 May 2011 18:21, Peter Stephenson <Peter.Stephenson@csr.com> wrote:
> On Wed, 11 May 2011 15:02:51 +0200
> Mikael Magnusson <mikachu@gmail.com> wrote:
>>       * The (@) flag; interacts obscurely with qt and isarr.
>>       * This is one of the things that decides whether multsub
>>       * will produce an array, but in an extremely indirect fashion.
>> @@ -1932,6 +1936,36 @@ paramsubst(LinkList l, LinkNode n, char **str,
>> int qt, int ssub) presc++;
>>                   break;
>>
>> +             case 'z':
>
> This might want to be 'g'.

Indeed, I noticed this line had spaces instead of tabs, so while
editing the patch file I copied the z line from the context and added
a +, taking care to change the z to a g as I did so, but somehow
didn't actually. So if this made you worry that I hadn't tested the
patch, fear not :). Speaking of testing, should I add tests for this
too? The c and e flags will have tendencies to output unprintable
characters, can I write them in the expected test output somehow? Ie,
it is probably not a good idea to write
>${(g:c:):-^X}
when testing that feature, since it'll break in the same way in both
places. It is probably not likely that c specifically would break and
everything else work, so I would personally be happy with just testing
g:: and maybe g:o: too, since that's easy enough. In fact...

--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -298,6 +298,14 @@
 >Howzat
 >usay

+  foo='\u65\123'
+  print -r ${(g:o:)foo}
+  foo='\u65\0123'
+  print -r ${(g::)foo}
+0:${(g)...}
+>eS
+>eS
+
   foo='I'\''m nearly out of my mind with tedium'
   bar=foo
   print ${(P)bar}


-- 
Mikael Magnusson


  reply	other threads:[~2011-05-11 16:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-11 13:02 Mikael Magnusson
2011-05-11 15:03 ` Bart Schaefer
2011-05-11 15:14   ` Mikael Magnusson
2011-05-11 16:03     ` Bart Schaefer
2011-05-11 16:22       ` Mikael Magnusson
2011-05-11 16:48         ` Bart Schaefer
2011-05-11 17:11           ` Mikael Magnusson
2011-05-11 15:47   ` Oliver Kiddle
2011-05-11 16:21 ` Peter Stephenson
2011-05-11 16:38   ` Mikael Magnusson [this message]
2011-05-11 17:07     ` Peter Stephenson
2011-05-11 17:19       ` Mikael Magnusson
2011-05-11 17:26         ` Peter Stephenson
2011-05-11 17:35           ` Mikael Magnusson
2011-05-11 17:43           ` Mikael Magnusson
2011-05-12 10:10             ` Bart Schaefer
2011-05-12 10:40               ` Mikael Magnusson
2011-05-12 14:04                 ` Bart Schaefer
2011-05-12 15:49                   ` PATCH: Add g:: parameter expansion flag Mikael Magnusson
2011-05-12 19:41                     ` Mikael Magnusson
2011-05-13  8:54                       ` Peter Stephenson
2011-05-13  9:51                         ` Mikael Magnusson
2011-05-13 11:54                           ` Peter Stephenson
2011-05-13 12:38                             ` Mikael Magnusson
2011-05-14 11:41 PATCH: expanding parameters like echo/print builtins Jilles Tjoelker
2011-05-14 18:41 ` 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=BANLkTika_BsgGtp73S2wreZjSUoRPTAx3A@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=Peter.Stephenson@csr.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).