zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Peter Stephenson <pws@pwstephenson.fsnet.co.uk>, zsh-users@sunsite.dk
Subject: Re: Zsh Guide chapter 5 (substitutions)
Date: Fri, 17 Aug 2001 16:55:50 +0000	[thread overview]
Message-ID: <1010817165550.ZM14226@candle.brasslantern.com> (raw)
In-Reply-To: <20010815230024.3E7F614284@pwstephenson.fsnet.co.uk>

On Aug 16, 12:00am, Peter Stephenson wrote:
}
} The main addition is chapter 5, which talks about all forms of shell
} substitutions and expansions.

Asoorted comments:

 The only thing you can't quote with single quotes is another single
 quote. However, there's an option RC_QUOTES, in which RC presumably
 stands for recursive,

Nope, RC stands for RC.  The Plan 9 shell (I think it is) is named "rc",
and nearly everything in zsh that has "rc" at the beginning of the name
(as opposed to at the end) means that the feature was copied from the
Plan 9 shell.  (At the end, as in ".zshrc", "runtime configuration" is
the meaning usually reported in Unix lore.)

   % args "${(f)$(<file)}"
   2

 I don't remember what the `f' stands for, but we were already using up
 flag codes quite fast when it came along.

I think it's for "fold", although it was added at a time when I was
paying less attention to zsh development.  At least that's a plausible
mnemonic.

 All the assignment types are affected by the globbing flags `A' and
 `AA' which tell the shell to perform array and associative array
 assignment ...

Should not say "globbing flags".

 Note you need the colon, else you are asking the shell to test whether
 a parameter is set, and it becomes rather unset when it realises there
 isn't one to test.                        ^^^^^

I should think.

 4. Now we have `${array[(r)???????]}'. It may not be obvious
    (congratulations if the rest is), but the question marks are still
    active as a pattern: the fill-in operation that put them there
    didn't turn them into strings, because that only happens at the
    point where a parameter is substituted, whereas these were added
    later. The subscript flag `(r)' means `reverse match',  ...

You're both right and wrong there.  It actually doesn't matter whether
the question marks are still active as a pattern or not.  Just go round
mumbling `extra layer of pattern expansion' and everyone will think you
know what you're talking about.

I have to stop now and go do this annoying "work" thing.  Back to part
5.6 later.

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

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  parent reply	other threads:[~2001-08-17 16:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-15 23:00 Peter Stephenson
2001-08-16  2:31 ` Bart Schaefer
2001-08-17 16:55 ` Bart Schaefer [this message]
2001-08-20 18:26 ` Bart Schaefer
2001-08-20 18:35   ` Phil Pennock
2001-08-21 16:38   ` Bart Schaefer
2001-08-21 14:21 ` Richard Curnow
2001-08-21 15:34   ` Bart Schaefer
2001-08-22 17:10 martin.ebourne
2001-08-23  7:30 ` Borsenkow Andrej
2001-08-23  7:41   ` Borsenkow Andrej

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=1010817165550.ZM14226@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=pws@pwstephenson.fsnet.co.uk \
    --cc=zsh-users@sunsite.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).