about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:09:05 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:09:05 +0000
commit9003d99d16c46b5679da7fcf1f2a41adef495ff9 (patch)
tree95244be534cc37c03a628068faf7712da6317196 /Doc
parentf13624e0f8a3c28c90aa0ce8ee36b639a491e4a9 (diff)
downloadzsh-9003d99d16c46b5679da7fcf1f2a41adef495ff9.tar.gz
zsh-9003d99d16c46b5679da7fcf1f2a41adef495ff9.tar.xz
zsh-9003d99d16c46b5679da7fcf1f2a41adef495ff9.zip
zsh-3.1.5-pws-3 zsh-3.1.5-pws-3
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/builtins.yo25
-rw-r--r--Doc/Zsh/expn.yo50
-rw-r--r--Doc/Zsh/guide.yo1
-rw-r--r--Doc/Zsh/mod_stat.yo10
-rw-r--r--Doc/Zsh/mod_zle.yo2
-rw-r--r--Doc/Zsh/modules.yo5
6 files changed, 84 insertions, 9 deletions
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index 1bbc9c36a..4eae549e5 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -512,7 +512,7 @@ sitem([var(mm)tt(:)]var(ss))(minutes and seconds)
 endsitem()
 )
 findex(local)
-item(tt(local) [ {tt(PLUS())|tt(-)}tt(LRZilrtu) [var(n)]] [ var(name)[tt(=)var(value)] ] ...)(
+item(tt(local) [ {tt(PLUS())|tt(-)}tt(ALRUZailrtu) [var(n)]] [ var(name)[tt(=)var(value)] ] ...)(
 Same as tt(typeset), except that the options tt(-x) and
 tt(-f) are not permitted.
 )
@@ -878,7 +878,7 @@ Equivalent to tt(whence -v).
 findex(typeset)
 cindex(parameters, setting)
 cindex(parameters, declaring)
-item(tt(typeset) [ {tt(PLUS())|tt(-)}tt(LRUZfilrtuxm) [var(n)]] [ var(name)[tt(=)var(value)] ... ])(
+item(tt(typeset) [ {tt(PLUS())|tt(-)}tt(ALRUZafilrtuxm) [var(n)]] [ var(name)[tt(=)var(value)] ... ])(
 Set attributes and values for shell parameters.
 When invoked inside a function a new parameter is created which will be
 unset when the function completes.  The new parameter will not be
@@ -887,6 +887,9 @@ exported provided no parameter of that name already exists.
 The following attributes are valid:
 
 startitem()
+item(tt(-A))(
+Declare var(name) to be an em(A)ssociation parameter (also known as a hash).
+)
 item(tt(-L))(
 Left justify and remove leading blanks from var(value).
 If var(n) is nonzero, it defines the width of the field;
@@ -916,6 +919,10 @@ If var(n) is nonzero it defines the width of the field;
 otherwise it is determined by the width of the value of the
 first assignment.
 )
+item(tt(-a))(
+On its own, this option produces a list of all array parameters.
+If any non-options are provided, the tt(typeset) command is silently ignored.
+)
 item(tt(-f))(
 The names refer to functions rather than parameters.  No assignments
 can be made, and the only other valid flags are tt(-t)
@@ -1115,7 +1122,10 @@ xitem(tt(zmodload) tt(-u) [ tt(-i) ] var(name) ...)
 xitem(tt(zmodload) tt(-d) [ tt(-L) ] [ var(name) [ var(dep) ... ] ])
 xitem(tt(zmodload) tt(-du) var(name) [ var(dep) ... ])
 xitem(tt(zmodload) tt(-a) [ tt(-iL) ] [ var(name) [ var(builtin) ... ] ])
-item(tt(zmodload) tt(-au) [ tt(-i) ] var(builtin) ...)(
+xitem(tt(zmodload) tt(-au) [ tt(-i) ] var(builtin) ...)
+xitem(tt(zmodload) tt(-c) [ tt(-iI) ] [ var(name) [ var(cond) ... ] ])
+xitem(tt(zmodload) tt(-cu) [ tt(-iI) ] var(cond) ...)
+item(tt(zmodload) tt(-c) [ tt(-IL) ])(
 tt(zmodload) performs operations relating to zsh's loadable modules.
 This feature is not available on all operating systems,
 or on all installations on a particular operating system.
@@ -1182,5 +1192,14 @@ together with the tt(-u) option it removes builtins defined with
 tt(zmodload -a).  This is only possible if the builtin is not yet
 loaded.  tt(-i) suppresses the error if the builtin is already
 removed (or never existed).
+
+The tt(-c) option is used to define autoloaded condition codes. The
+var(cond) strings give the names of the conditions defined by the
+module. The optional tt(-I) option is used to define infix condition
+names. Without this option prefix condition names are defined.
+
+Together with the tt(-u) option definitions for autoloaded conditions
+are removed. If given no condition names all defined names are listed
+(as a series of tt(zmodload) commands if the tt(-L) option is given).
 )
 enditem()
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index ba8a1d239..5341ec61e 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -312,8 +312,10 @@ noderef(Parameters)
 for a description of parameters.
 In the expansions discussed below that require a pattern, the form of
 the pattern is the same as that used for filename generation;
-see noderef(Filename Generation).  In addition to the following
-operations, the file modifiers described in
+see noderef(Filename Generation).  Note that this pattern, along with
+the replacement text of a substitution, is itself subject to
+parameter, command and arithmetic substitution.  In addition to the
+following operations, the file modifiers described in
 noderef(Modifiers) in noderef(History Expansion) can be
 applied:  for example, tt(${i:s/foo/bar/}) performs string
 substitution on the value of parameter tt($i).
@@ -398,6 +400,37 @@ is used, matching is performed on each array elements separately, and
 the matched array elements are removed (use the tt((M)) flag to
 remove the non-matched elements).
 )
+xitem(tt(${)var(name)tt(/)var(pattern)tt(/)var(repl)tt(}))
+item(tt(${)var(name)tt(//)var(pattern)tt(/)var(repl)tt(}))(
+Substitute the longest possible match of var(pattern) in the value of
+variable var(name) with the string var(repl).  The first form
+substitutes just the first occurrence, the second all occurrences.
+The var(pattern) may begin with a var(#), in which case the
+var(pattern) must match at the start of the string, or var(%), in
+which case it must match at the end of the string.  The var(repl) may
+be an empty string, in which case the final tt(/) may also be omitted.
+To quote the final tt(/) in other cases it should be preceded by two
+backslashes (i.e., a quoted backslash); this is not necessary if the
+tt(/) occurs inside a substituted paramter.  Substitution of an array
+is as described for tt(#) and tt(%) above.
+
+The first tt(/) may be preceded by a tt(:), in which case the match
+will only succeed if it matches the entire word.  Note also the
+effect of the tt(I) and tt(S) parameter expansion flags below:  the
+flags tt(M), tt(R), tt(B), tt(E) and tt(N) are not useful, however.
+
+For example,
+
+nofill(tt(foo="twinkle twinkle little star" sub="t*e" rep="spy"))
+nofill(tt(print ${foo//${~sub}/$rep}))
+nofill(tt(print ${(S)foo//${~sub}/$rep}))
+
+Here, the tt(~) ensures that the text of tt($sub) is treated as a
+pattern rather than a plain string.  In the first case, the longest
+match for tt(t*e) is substituted and the result is `tt(spy star)',
+while in the second case, the shortest matches are taken and the
+result is `tt(spy spy lispy star)'.
+)
 item(tt(${#)var(spec)tt(}))(
 If var(spec) is one of the above substitutions, substitute
 the length in characters of the result instead of
@@ -549,10 +582,21 @@ for `tt(ps:\n:)'.
 item(tt(S))(
 (This and all remaining flags are used with the tt(${)...tt(#)...tt(}) or
 tt(${)...tt(%)...tt(}) forms.)
-Search substrings as well as beginnings or ends.
+Search substrings as well as beginnings or ends; with tt(#) start
+from the beginning and with tt(%) start from the end of the string.
+With substitution via tt(${)...tt(/)...tt(}) or
+tt(${)...tt(//)...tt(}), specifies that the shortest instead of the
+longest match should be replaced.
 )
 item(tt(I:)var(expr)tt(:))(
 Search the var(expr)th match (where var(expr) evaluates to a number).
+This only applies when searching for substrings, either with the tt(S)
+flag, or with tt(${)...tt(/)...tt(}) (only the var(expr)th match is
+substituted) or tt(${)...tt(//)...tt(}) (all matches from the
+var(expr)th on are substituted).  The var(expr)th match is counted
+such that there is either one or zero matches from each starting
+position in the string, although for global subsitution matches
+overlapping previous replacements are ignored.
 )
 item(tt(M))(
 Include the matched portion in the result.
diff --git a/Doc/Zsh/guide.yo b/Doc/Zsh/guide.yo
index d38a0d308..f54e6bfdb 100644
--- a/Doc/Zsh/guide.yo
+++ b/Doc/Zsh/guide.yo
@@ -114,6 +114,7 @@ menu(The example Module)
 menu(The files Module)
 menu(The sched Module)
 menu(The stat Module)
+menu(The zftp Module)
 menu(The zle Module)
 endmenu()
 texinode(The Z Shell Guide)(Introduction)(Top)(Top)
diff --git a/Doc/Zsh/mod_stat.yo b/Doc/Zsh/mod_stat.yo
index 22fbe2a73..a8551d8e9 100644
--- a/Doc/Zsh/mod_stat.yo
+++ b/Doc/Zsh/mod_stat.yo
@@ -1,4 +1,4 @@
-texinode(The stat Module)(The zle Module)(The sched Module)(Zsh Modules)
+texinode(The stat Module)(The zftp Module)(The sched Module)(Zsh Modules)
 sect(The stat Module)
 The tt(stat) module makes available one builtin command:
 
@@ -6,7 +6,8 @@ startitem()
 findex(stat)
 cindex(files, listing)
 cindex(files, examining)
-item(tt(stat) [ tt(-gnNlLtTrs) ] [ tt(-f) var(fd) ] [ tt(-A) var(array) ] \
+item(tt(stat) [ tt(-gnNlLtTrs) ] [ tt(-f) var(fd) ] \
+    [ tt(-H) var(hash) ] [ tt(-A) var(array) ] \
     [ tt(-F) var(fmt) ] [ tt(PLUS())var(element) ] [ var(file) ... ])(
 The command acts as a front end to the tt(stat) system call (see
 manref(stat)(2)).
@@ -91,6 +92,11 @@ appropriate array element and in the latter case the file name
 appears as a separate array element preceding all the others.
 Other formatting options are respected.
 )
+item(tt(-H) var(hash))(
+Similar to tt(-A), but instead assign the values to var(hash).  The keys
+are the elements listed above.  If the tt(-n) option is provided then the
+name of the file is included in the hash with key tt(name).
+)
 item(tt(-f) var(fd))(
 Use the file on file descriptor var(fd) instead of
 named files; no list of file names is allowed in this case.
diff --git a/Doc/Zsh/mod_zle.yo b/Doc/Zsh/mod_zle.yo
index b7c6a934f..48dd1935f 100644
--- a/Doc/Zsh/mod_zle.yo
+++ b/Doc/Zsh/mod_zle.yo
@@ -1,4 +1,4 @@
-texinode(The zle Module)()(The stat Module)(Zsh Modules)
+texinode(The zle Module)()(The zftp Module)(Zsh Modules)
 sect(The zle Module)
 The tt(zle) module contains the Zsh Line Editor.  See
 ifzman(zmanref(zshzle))\
diff --git a/Doc/Zsh/modules.yo b/Doc/Zsh/modules.yo
index b44b00e6b..300553845 100644
--- a/Doc/Zsh/modules.yo
+++ b/Doc/Zsh/modules.yo
@@ -36,6 +36,9 @@ A builtin that provides a timed execution facility within the shell.
 item(tt(stat))(
 A builtin command interface to the tt(stat) system call.
 )
+item(tt(zftp))(
+A builtin FTP client.
+)
 item(tt(zle))(
 The Zsh Line Editor, including the tt(bindkey) and tt(vared) builtins.
 )
@@ -50,6 +53,7 @@ menu(The example Module)
 menu(The files Module)
 menu(The sched Module)
 menu(The stat Module)
+menu(The zftp Module)
 menu(The zle Module)
 endmenu()
 includefile(Zsh/mod_cap.yo)
@@ -61,4 +65,5 @@ includefile(Zsh/mod_example.yo)
 includefile(Zsh/mod_files.yo)
 includefile(Zsh/mod_sched.yo)
 includefile(Zsh/mod_stat.yo)
+includefile(Zsh/mod_zftp.yo)
 includefile(Zsh/mod_zle.yo)