about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-05-31 17:10:12 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-05-31 17:10:12 +0000
commitf42e3fa8e6152e145251e8f16f4c61c23dec1f59 (patch)
tree9a7b104b910ae53f6a49cb4e35c3dedc737e907b /Doc
parent4fec788fa5f6e7c9723e02e3d0b57068ce9785aa (diff)
downloadzsh-f42e3fa8e6152e145251e8f16f4c61c23dec1f59.tar.gz
zsh-f42e3fa8e6152e145251e8f16f4c61c23dec1f59.tar.xz
zsh-f42e3fa8e6152e145251e8f16f4c61c23dec1f59.zip
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Makefile.in15
-rw-r--r--Doc/Zsh/.distfiles14
-rw-r--r--Doc/Zsh/compwid.yo7
-rw-r--r--Doc/Zsh/files.yo26
-rw-r--r--Doc/Zsh/mod_files.yo2
-rw-r--r--Doc/Zsh/mod_mapfile.yo46
-rw-r--r--Doc/Zsh/mod_parameter.yo2
-rw-r--r--Doc/Zsh/modules.yo5
8 files changed, 88 insertions, 29 deletions
diff --git a/Doc/Makefile.in b/Doc/Makefile.in
index 7d4d4745c..f7dbf3866 100644
--- a/Doc/Makefile.in
+++ b/Doc/Makefile.in
@@ -27,8 +27,15 @@
 subdir = Doc
 dir_top = ..
 
-@@version.mk@@
-@@defs.mk@@
+@VERSION_MK@
+
+# source/build directories
+VPATH           = @srcdir@
+sdir            = @srcdir@
+sdir_top        = @top_srcdir@
+INSTALL         = @INSTALL@
+
+@DEFS_MK@
 
 MAKEINFO = makeinfo
 TEXI2DVI = texi2dvi
@@ -195,7 +202,7 @@ uninstall.info:
 
 # ========== DEPENDENCIES FOR CLEANUP ==========
 
-@@clean.mk@@
+@CLEAN_MK@
 
 clean-here:
 	rm -f *.html *.info* *.dvi *.ps
@@ -210,4 +217,4 @@ realclean-here:
 
 # ========== DEPENDENCIES FOR MAINTENANCE ==========
 
-@@config.mk@@
+@CONFIG_MK@
diff --git a/Doc/Zsh/.distfiles b/Doc/Zsh/.distfiles
index 785febb16..f3e7352a5 100644
--- a/Doc/Zsh/.distfiles
+++ b/Doc/Zsh/.distfiles
@@ -1,10 +1,10 @@
 DISTFILES_SRC='
     .distfiles
-    arith.yo builtins.yo compat.yo compctl.yo compsys.yo compwid.yo
-    cond.yo exec.yo expn.yo filelist.yo files.yo func.yo grammar.yo
-    guide.yo index.yo intro.yo invoke.yo jobs.yo metafaq.yo mod_cap.yo
-    mod_clone.yo mod_comp1.yo mod_compctl.yo mod_deltochar.yo
-    mod_example.yo mod_files.yo mod_parameter.yo mod_sched.yo
-    mod_stat.yo mod_zftp.yo mod_zle.yo modules.yo options.yo params.yo
-    prompt.yo redirect.yo restricted.yo seealso.yo zftpsys.yo zle.yo
+    arith.yo builtins.yo compat.yo compctl.yo compwid.yo cond.yo exec.yo
+    expn.yo filelist.yo files.yo func.yo grammar.yo guide.yo index.yo intro.yo
+    invoke.yo jobs.yo metafaq.yo mod_cap.yo mod_clone.yo mod_comp1.yo
+    mod_compctl.yo mod_deltochar.yo mod_example.yo mod_files.yo
+    mod_mapfile.yo mod_sched.yo mod_stat.yo mod_zftp.yo mod_zle.yo
+    modules.yo options.yo params.yo 
+    prompt.yo redirect.yo restricted.yo seealso.yo zle.yo
 '
diff --git a/Doc/Zsh/compwid.yo b/Doc/Zsh/compwid.yo
index 79577d13d..d74054a9c 100644
--- a/Doc/Zsh/compwid.yo
+++ b/Doc/Zsh/compwid.yo
@@ -424,7 +424,8 @@ is the same character.
 )
 item(tt(-r) var(remove-chars))(
 This is a more versatile form of the tt(-q) option.
-The suffix given with tt(-S) will be automatically removed if
+The suffix given with tt(-S) or the slash automatically added after
+completing directories will be automatically removed if
 the next character typed inserts one of the characters given in the
 var(remove-chars).  This string is parsed as a characters class and
 understands the backslash sequences used by the tt(print) command.  For
@@ -436,8 +437,8 @@ all characters that insert nothing. Thus `tt(-S "=" -q)' is the same
 as `tt(-S "=" -r "= \t\n\-")'.
 )
 item(tt(-R) var(remove-func))(
-This is another form of the tt(-r) option. When a suffix given with the
-tt(-S) option has been inserted and the completion accepted, the function
+This is another form of the tt(-r) option. When a suffix 
+has been inserted and the completion accepted, the function
 var(remove-func) will be called after the next character typed.  It is
 passed the length of the suffix as an argument and can use the special
 parameters available in ordinary (non-completion) zle widgets (see
diff --git a/Doc/Zsh/files.yo b/Doc/Zsh/files.yo
index 6eb6c202e..9ff59fe19 100644
--- a/Doc/Zsh/files.yo
+++ b/Doc/Zsh/files.yo
@@ -6,12 +6,17 @@ cindex(startup files)
 cindex(files, shutdown)
 cindex(shutdown files)
 pindex(NO_RCS, use of)
-Commands are first read from tt(/etc/zshenv).
-If the tt(RCS) option is unset
-within tt(/etc/zshenv), all other
-initialization files are skipped.
-Otherwise, commands are read
-from tt($ZDOTDIR/.zshenv).
+pindex(NO_GLOBAL_RCS, use of)
+Commands are first read from tt(/etc/zshenv); this cannot be overridden.
+If the tt(RCS) option is unset, no further files are read; changing this
+option after this point has no effect on initialization files, but may
+affect behaviour on logout.  Subsequent behaviour is also modified by the
+option tt(GLOBAL_RCS).  If it is unset at any point during initialisation,
+later files in the tt(/etc) directory will not be read.  It is also
+possible for a file in tt($ZDOTDIR) to re-enable tt(GLOBAL_RCS). Both
+tt(RCS) and tt(GLOBAL_RCS) are set by default.
+
+Commands are then read from tt($ZDOTDIR/.zshenv).
 pindex(LOGIN, use of)
 If the shell is a login shell, commands
 are read from tt(/etc/zprofile) and then tt($ZDOTDIR/.zprofile).
@@ -20,20 +25,15 @@ commands are read from tt(/etc/zshrc) and then tt($ZDOTDIR/.zshrc).
 Finally, if the shell is a login shell, tt(/etc/zlogin) and
 tt($ZDOTDIR/.zlogin) are read.
 
-If the option tt(GLOBAL_RCS_FIRST) is set when the shell is invoked or in
-the file tt(/etc/zshenv), then all the applicable global startup files are
-read before all the users', so that the order becomes tt(/etc/zshenv)
-... tt(/etc/zlogin), tt($ZDOTDIR/.zshenv) ... tt($ZDOTDIR/.zlogin).
-After tt(/etc/zshenv) has been read, changing the option has no further
-effect.
-
 When a login shell exits, the files tt($ZDOTDIR/.zlogout) and then
 tt(/etc/zlogout) are read.  This happens with either an explicit exit
 via the tt(exit) or tt(logout) commands, or an implict exit by reading
 end-of-file from the terminal.  However, if the shell terminates due
 to tt(exec)'ing another process, the logout files are not read.
+These are also affected by the tt(RCS) and tt(GLOBAL_RCS) options.
 
 If tt(ZDOTDIR) is unset, tt(HOME) is used instead.
 Those files listed above as being in tt(/etc) may be in another
 directory, depending on the installation.
 ifnzman(includefile(Zsh/filelist.yo))
+
diff --git a/Doc/Zsh/mod_files.yo b/Doc/Zsh/mod_files.yo
index 160473fba..932d8583c 100644
--- a/Doc/Zsh/mod_files.yo
+++ b/Doc/Zsh/mod_files.yo
@@ -1,4 +1,4 @@
-texinode(The files Module)(The parameter Module)(The example Module)(Zsh Modules)
+texinode(The files Module)(The mapfile Module)(The example Module)(Zsh Modules)
 sect(The files Module)
 cindex(files, manipulating)
 The tt(files) module makes some standard commands available as builtins:
diff --git a/Doc/Zsh/mod_mapfile.yo b/Doc/Zsh/mod_mapfile.yo
new file mode 100644
index 000000000..6d0475711
--- /dev/null
+++ b/Doc/Zsh/mod_mapfile.yo
@@ -0,0 +1,46 @@
+texinode(The mapfile Module)(The parameter Module)(The files Module)(Zsh Modules)
+sect(The mapfile Module)
+cindex(parameter, file access via)
+The tt(mapfile) module provides one special associative array parameter of
+the same name.
+
+startitem()
+vindex(mapfile)
+item(tt(mapfile))(
+This associative array takes as keys the names of files; the resulting
+value is the content of the file.  The value is treated identically to any
+other text coming from a parameter.  The value may also be assigned to, in
+which case the file in question is written (whether or not it originally
+existed); or an element may be unset, which will delete the file in
+question.  For example, `tt(vared mapfile[myfile])' works as expected,
+editing the file `tt(myfile)'.
+
+When the array is accessed as a whole, the keys are the names of files in
+the current directory, and the values are empty (to save a huge overhead in
+memory).  Thus tt(${(k)mapfile}) has the same affect as the glob operator
+tt(*(D)), since files beginning with a dot are not special.  Care must be
+taken with expressions such as tt(rm ${(k)mapfile}), which will delete
+every file in the current directory without the usual `tt(rm *)' test.
+
+The parameter tt(mapfile) may be made read-only; in that case, files
+referenced may not be written or deleted.
+)
+enditem()
+
+subsect(Limitations)
+
+Although reading and writing of the file in question is efficiently
+handled, zsh's internal memory management may be arbitrarily baroque.  Thus
+it should not automatically be assumed that use of tt(mapfile) represents a
+gain in efficiency over use of other mechanisms.  Note in particular that
+the whole contents of the file will always reside physically in memory when
+accessed (possibly multiple times, due to standard parameter subsitution
+operations).
+
+No errors are printed or flagged for non-existent, unreadable, or
+unwriteable files, as the parameter mechanism is too low in the shell
+execution hierarchy to make this convenient.
+
+It is unfortunate that the mechanism for loading modules does not yet allow
+the user to specify the name of the shell parameter to be given the special
+behaviour.
diff --git a/Doc/Zsh/mod_parameter.yo b/Doc/Zsh/mod_parameter.yo
index c84dd18eb..4fe537c6d 100644
--- a/Doc/Zsh/mod_parameter.yo
+++ b/Doc/Zsh/mod_parameter.yo
@@ -1,4 +1,4 @@
-texinode(The parameter Module)(The sched Module)(The files Module)(Zsh Modules)
+texinode(The parameter Module)(The sched Module)(The mapfile Module)(Zsh Modules)
 sect(The parameter Module)
 cindex(parameters, special)
 The tt(parameter) module gives access to some of the internal hash
diff --git a/Doc/Zsh/modules.yo b/Doc/Zsh/modules.yo
index a7c528951..0b487f673 100644
--- a/Doc/Zsh/modules.yo
+++ b/Doc/Zsh/modules.yo
@@ -31,6 +31,9 @@ An example of how to write a module.
 item(tt(files))(
 Some basic file manipulation commands as builtins.
 )
+item(tt(mapfile))(
+Access to external files via a special associative array.
+)
 item(tt(parameter))(
 Access to internal hash tables via special associative arrays.
 )
@@ -55,6 +58,7 @@ menu(The compctl Module)
 menu(The deltochar Module)
 menu(The example Module)
 menu(The files Module)
+menu(The mapfile Module)
 menu(The parameter Module)
 menu(The sched Module)
 menu(The stat Module)
@@ -68,6 +72,7 @@ includefile(Zsh/mod_compctl.yo)
 includefile(Zsh/mod_deltochar.yo)
 includefile(Zsh/mod_example.yo)
 includefile(Zsh/mod_files.yo)
+includefile(Zsh/mod_mapfile.yo)
 includefile(Zsh/mod_parameter.yo)
 includefile(Zsh/mod_sched.yo)
 includefile(Zsh/mod_stat.yo)