summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-10-05 13:28:24 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-10-05 13:28:24 +0000
commit298a8b8130bd3f515c1aa9f8fcd901c878cbb668 (patch)
tree581e25ef8ee1e6bf8dca17affe2d0ef14b5bcc49
parente4675cead4f6e19e9898e4e7ec58691e438344b8 (diff)
downloadzsh-298a8b8130bd3f515c1aa9f8fcd901c878cbb668.tar.gz
zsh-298a8b8130bd3f515c1aa9f8fcd901c878cbb668.tar.xz
zsh-298a8b8130bd3f515c1aa9f8fcd901c878cbb668.zip
22818: improved subscript flag doc
unposted: trivial _perforce tweak
-rw-r--r--ChangeLog8
-rw-r--r--Completion/Unix/Command/_perforce2
-rw-r--r--Doc/Zsh/params.yo18
3 files changed, 22 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 082ed2ade..11988e1a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-10-05  Peter Stephenson  <pws@csr.com>
+
+	* unposted: Completion/Unix/Command/_perforce: improved
+	message when not completing after "p4 clients".
+
+	* 22818: Doc/Zsh/params.yo: delimiters in subscript flags
+	are like those in parameter substitution.
+
 2006-10-03  Clint Adams  <clint@zsh.org>
 
 	* 22816: Joerg Sommer: Completion/Unix/Command/_pon:
diff --git a/Completion/Unix/Command/_perforce b/Completion/Unix/Command/_perforce
index 7e2a27456..0afbbcb8c 100644
--- a/Completion/Unix/Command/_perforce
+++ b/Completion/Unix/Command/_perforce
@@ -1586,7 +1586,7 @@ _perforce_cmd_client() {
 (( $+functions[_perforce_cmd_clients] )) ||
 _perforce_cmd_clients() {
   # No arguments.
-  _arguments -s :
+  _message "no arguments"
 }
 
 
diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo
index 30bf1174c..bbe3354ce 100644
--- a/Doc/Zsh/params.yo
+++ b/Doc/Zsh/params.yo
@@ -169,25 +169,31 @@ cindex(subscript flags)
 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 @@ item(tt(n:)var(expr)tt(:))(
 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