zsh-workers
 help / color / mirror / code / Atom feed
* Re: Question on array processing.
       [not found]     ` <20061004202028.GB5956@lucien.blight.com>
@ 2006-10-05 13:09       ` Peter Stephenson
  0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2006-10-05 13:09 UTC (permalink / raw)
  To: Larry P. Schrof, zsh-workers

Here's a modification to the parameter manual entry.

Index: Doc/Zsh/params.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/params.yo,v
retrieving revision 1.33
diff -u -r1.33 params.yo
--- Doc/Zsh/params.yo	2 Aug 2006 17:16:38 -0000	1.33
+++ Doc/Zsh/params.yo	5 Oct 2006 13:07:18 -0000
@@ -169,25 +169,31 @@
 If the opening bracket, or the comma in a range, in any subscript
 expression is directly followed by an opening parenthesis, the string up
 to the matching closing one is considered to be a list of flags, as in
-`var(name)tt([LPAR())var(flags)tt(RPAR())var(exp)tt(])'.  The flags
-currently understood are:
+`var(name)tt([LPAR())var(flags)tt(RPAR())var(exp)tt(])'.
+
+The flags tt(s), tt(n) and tt(b) take an argument; the delimiter
+is shown below as `tt(:)', but any character, or the matching pairs
+`tt(LPAR())...tt(RPAR())', `tt({)...tt(})', `tt([)...tt(])', or
+`tt(<)...tt(>)', may be used.
+
+The flags currently understood are:
 
 startitem()
 item(tt(w))(
-If the parameter subscripted is a scalar than this flag makes
+If the parameter subscripted is a scalar then this flag makes
 subscripting work on words instead of characters.  The default word
 separator is whitespace.
 )
 item(tt(s:)var(string)tt(:))(
 This gives the var(string) that separates words (for use with the
-tt(w) flag).
+tt(w) flag).  The delimiter character tt(:) is arbitrary; see above.
 )
 item(tt(p))(
 Recognize the same escape sequences as the tt(print) builtin in
 the string argument of a subsequent `tt(s)' flag.
 )
 item(tt(f))(
-If the parameter subscripted is a scalar than this flag makes
+If the parameter subscripted is a scalar then this flag makes
 subscripting work on lines instead of characters, i.e. with elements
 separated by newlines.  This is a shorthand for `tt(pws:\n:)'.
 )
@@ -269,11 +275,13 @@
 If combined with `tt(r)', `tt(R)', `tt(i)' or `tt(I)', makes them give
 the var(n)th or var(n)th last match (if var(expr) evaluates to
 var(n)).  This flag is ignored when the array is associative.
+The delimiter character tt(:) is arbitrary; see above.
 )
 item(tt(b:)var(expr)tt(:))(
 If combined with `tt(r)', `tt(R)', `tt(i)' or `tt(I)', makes them begin
 at the var(n)th or var(n)th last element, word, or character (if var(expr)
 evaluates to var(n)).  This flag is ignored when the array is associative.
+The delimiter character tt(:) is arbitrary; see above.
 )
 item(tt(e))(
 This flag has no effect and for ordinary arrays is retained for backward

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-10-05 13:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20061004200025.GA3092@lucien.blight.com>
     [not found] ` <20061004200759.GG54791@dan.emsphone.com>
     [not found]   ` <20061004201018.GH54791@dan.emsphone.com>
     [not found]     ` <20061004202028.GB5956@lucien.blight.com>
2006-10-05 13:09       ` Question on array processing Peter Stephenson

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).