zsh-workers
 help / color / mirror / code / Atom feed
From: mason@primenet.com.au (Geoff Wing)
To: zsh-workers@sunsite.auc.dk
Subject: Re: zsh-3.1.5-pws-14: parameter expansion not working properly
Date: 12 Apr 1999 07:35:08 GMT	[thread overview]
Message-ID: <slrn7h38hc.fhm.mason@coral.primenet.com.au> (raw)
In-Reply-To: <003001be84b0$d9790490$21c9ca95@mowp.siemens.ru>

Andrej Borsenkow <borsenkow.msk@sni.de> typed:
:Yes, as I understand, it was changed in pws-14. It includes full description
:of subst rules in Parameters expansion section of manual.
:Basically, in quotes, the value of inner substitution is always forced to be
:scalar for outer substitution unless some flags or modifiers (notably, =,
:(@), (s)) prevent it.
:> % zsh-3.1.5-pws-14
:> % a=("${(f@)$(echo foo; echo bar)}"); print -l $a
:> foo
:> bar
:So, it is not a bug, it is by desing. There was a long thread here, where I
:tried to understand what ZSH substitution rules actually are. I admit (now
::-) that current state is more or less consistent. The problem is, it is
:near to impossible to explain difference between pws-14 and earlier versions
:because it is the first time these rules are explicitly stated.

OK, thanks, so in Misc/compctl-examples, we now have something like the
following and I can happily (yeah!) complete in cvs again:

cvsentries () {
        setopt localoptions nullglob unset
        if [[ -f ${pref}CVS/Entries ]]
        then
		reply=("${pref}${(@)^${(@)${(@)${(f)$(<${pref}CVS/Entries)}:#D*}#/}%%/*}")
        fi
}

-- 
Geoff Wing   <gcw@pobox.com>            Mobile : (Australia) 0412 162 441
Work URL: http://www.primenet.com.au/   Ego URL: http://pobox.com/~gcw/


      reply	other threads:[~1999-04-12  7:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-10 11:28 BUG: " Geoff Wing
1999-04-12  6:51 ` Andrej Borsenkow
1999-04-12  7:35   ` Geoff Wing [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=slrn7h38hc.fhm.mason@coral.primenet.com.au \
    --to=mason@primenet.com.au \
    --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).