zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi  <hzoli@math.gatech.edu>
To: zsh-workers@math.gatech.edu (zsh-workers)
Subject: Re: ZSH's future [longish] ?
Date: Fri, 27 Oct 1995 02:37:52 +0100 (MET)	[thread overview]
Message-ID: <199510270137.CAA10609@bolyai.cs.elte.hu> (raw)
In-Reply-To: <9510262244.AA21513@charney.cdc.noaa.gov> from "Mark Borges" at Oct 26, 95 04:44:33 pm

> Z> But it can also be used as a powerful script language.  An example:
> Z> with my releases the expansion of ${${(f)$(</etc/group)}%%:*} gives
> Z> the list of the group names from /etc/groups.
> 
> Uh-oh. If I use the (f) qualifier I only get the first line -- without
> it, I get all the group names in a single line separated by
> whitespace. A bug in my (old) hzoli version -- 2.6-beta11-test7-hzoli11 --
> perhaps? 

No, not a bug.  I forgot to mention that it should be put inside double
quotes.  Without double quotes word splitting is done on $(</etc/group) which
removes line breaks.  Double quotes disable word splitting but the explicit
(f) qualifier forces line splitting which is later handled like an array.
Even rc_expand_param can be used, just try "/${^${(f)$(</etc/group)}%%:*}/".
And this is only a simple example...

Cheers,
  Zoltan


  reply	other threads:[~1995-10-27  1:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-10-26  6:26 Mark Borges
1995-10-26  7:25 ` ZSH's future Richard Coleman
1995-10-26 15:13 ` ZSH's future [longish] ? Zoltan Hidvegi
1995-10-26 22:44   ` Mark Borges
1995-10-27  1:37     ` Zoltan Hidvegi [this message]
1995-10-27  8:16     ` ZSH's future - POSIX Geoff Wing
1995-10-27 22:53       ` Richard Coleman

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=199510270137.CAA10609@bolyai.cs.elte.hu \
    --to=hzoli@math.gatech.edu \
    --cc=zsh-workers@math.gatech.edu \
    /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).