path: root/Doc
diff options
authorTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:05:35 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:05:35 +0000
commitc175751b501a3a4cb40ad4787340a597ea769be4 (patch)
treef5cd9e9bf7dbfb5b91569181f260965c0a3cb8ad /Doc
Initial revision
Diffstat (limited to 'Doc')
55 files changed, 12002 insertions, 0 deletions
diff --git a/Doc/.cvsignore b/Doc/.cvsignore
new file mode 100644
index 000000000..11b508947
--- /dev/null
+++ b/Doc/.cvsignore
@@ -0,0 +1,15 @@
+zsh.aux zsh.toc
+zsh.cp zsh.cps
+zsh.fn zsh.fns
+zsh.ky zsh.kys
+zsh.pg zsh.pgs
+zsh.vr zsh.vrs
+zsh.log zsh.dvi
+zsh.tp zsh.tps
diff --git a/Doc/.distfiles b/Doc/.distfiles
new file mode 100644
index 000000000..7fd1cdcc1
--- /dev/null
+++ b/Doc/.distfiles
@@ -0,0 +1,16 @@
+ .cvsignore .distfiles Makefile.in
+ META-FAQ.yo intro.ms
+ version.yo zmacros.yo zman.yo ztexi.yo
+ zsh.yo zshbuiltins.yo zshcompctl.yo zshexpn.yo zshmisc.yo
+ zshmodules.yo zshoptions.yo zshparam.yo zshzle.yo
+ zsh.texi
+ zsh.1 zshbuiltins.1 zshcompctl.1 zshexpn.1 zshmisc.1 zshmodules.1
+ zshoptions.1 zshparam.1 zshzle.1 zshall.1
+ zsh.info zsh.info-[0-9]*
+ zsh_toc.html zsh_[0-9]*.html
+ zsh.dvi zsh_us.ps zsh_a4.ps
diff --git a/Doc/META-FAQ.yo b/Doc/META-FAQ.yo
new file mode 100644
index 000000000..019264601
--- /dev/null
+++ b/Doc/META-FAQ.yo
@@ -0,0 +1,44 @@
+def(startitem)(0)(NEXTLINE DELLINE)
+def(list)(1)( ARG1)
+ '\n' = "\n"
+ '\n' = "\n "
+META-FAQ for the Z Shell
+The latest version of this META-FAQ can be found at any of the FTP sites
+listed below.
diff --git a/Doc/Makefile.in b/Doc/Makefile.in
new file mode 100644
index 000000000..1883abfd1
--- /dev/null
+++ b/Doc/Makefile.in
@@ -0,0 +1,172 @@
+# Makefile for Doc subdirectory
+# Copyright (c) 1995-1997 Richard Coleman
+# All rights reserved.
+# Permission is hereby granted, without written agreement and without
+# license or royalty fees, to use, copy, modify, and distribute this
+# software and to distribute modified versions of this software for any
+# purpose, provided that the above copyright notice and the following
+# two paragraphs appear in all copies of this software.
+# In no event shall Richard Coleman or the Zsh Development Group be liable
+# to any party for direct, indirect, special, incidental, or consequential
+# damages arising out of the use of this software and its documentation,
+# even if Richard Coleman and the Zsh Development Group have been advised of
+# the possibility of such damage.
+# Richard Coleman and the Zsh Development Group specifically disclaim any
+# warranties, including, but not limited to, the implied warranties of
+# merchantability and fitness for a particular purpose. The software
+# provided hereunder is on an "as is" basis, and Richard Coleman and the
+# Zsh Development Group have no obligation to provide maintenance,
+# support, updates, enhancements, or modifications.
+subdir = Doc
+dir_top = ..
+MAKEINFO = makeinfo
+TEXI2DVI = texi2dvi
+DVIPS = dvips -D 300
+TEXI2HTML = texi2html -expandinfo -split_chapter
+.SUFFIXES: .yo .1
+# man pages to install
+MAN = zsh.1 zshbuiltins.1 zshcompctl.1 \
+zshexpn.1 zshmisc.1 zshmodules.1 \
+zshoptions.1 zshparam.1 zshzle.1 zshall.1
+# yodl documentation
+YODLDOC = $(MAN) zsh.texi
+YODLSRC = zmacros.yo zman.yo ztexi.yo Zsh/arith.yo Zsh/builtins.yo \
+Zsh/compat.yo Zsh/compctl.yo Zsh/cond.yo Zsh/exec.yo Zsh/expn.yo \
+Zsh/filelist.yo Zsh/files.yo Zsh/func.yo Zsh/grammar.yo Zsh/guide.yo \
+Zsh/index.yo Zsh/intro.yo Zsh/invoke.yo Zsh/jobs.yo Zsh/metafaq.yo \
+Zsh/modules.yo Zsh/mod_cap.yo \
+Zsh/mod_clone.yo Zsh/mod_comp1.yo Zsh/mod_compctl.yo Zsh/mod_deltochar.yo \
+Zsh/mod_example.yo Zsh/mod_files.yo Zsh/mod_stat.yo \
+Zsh/mod_zle.yo Zsh/options.yo \
+Zsh/params.yo Zsh/prompt.yo Zsh/redirect.yo Zsh/restricted.yo \
+Zsh/seealso.yo Zsh/zle.yo
+# ========== DEPENDENCIES FOR BUILDING ==========
+all: $(MAN) zsh.texi zsh.info ../META-FAQ
+everything: all zsh.dvi zsh_us.ps zsh_a4.ps zsh_toc.html
+zsh.dvi: zsh.texi
+ $(TEXI2DVI) $(sdir)/zsh.texi
+zsh.info: zsh.texi
+ $(MAKEINFO) $(sdir)/zsh.texi; exit 0
+zsh.texi: zsh.yo
+ $(YODL) -o $(sdir)/zsh.texi -I$(sdir) -w ztexi.yo version.yo zsh.yo
+ test -f $(sdir)/zsh.texi
+ case $@ in \
+ */*) target=$@ ;; \
+ *) target=$(sdir)/$@ ;; \
+ esac; \
+ $(YODL) -o $$target -I$(sdir) -w zman.yo version.yo $< || exit 1; \
+ test -f $$target
+zsh_us.ps: zsh.dvi
+ $(DVIPS) -t letter -o $@ zsh.dvi
+zsh_a4.ps: zsh.dvi
+ $(DVIPS) -t a4 -o $@ zsh.dvi
+zsh_toc.html: zsh.texi
+ $(TEXI2HTML) $(sdir)/zsh.texi
+zshall.1: zsh.yo
+ case $@ in \
+ */*) target=$@ ;; \
+ *) target=$(sdir)/$@ ;; \
+ esac; \
+ $(YODL) -o $$target -I$(sdir) -DZSHALL -w zman.yo version.yo zsh.yo || exit 1; \
+ test -f $$target
+../META-FAQ: META-FAQ.yo Zsh/metafaq.yo
+ $(YODL) -I$(sdir) META-FAQ.yo | sed -e '/NEXTLINE/N' -e '/DELLINE/d' -e '/^SECTHEAD$$/{N;s/^SECTHEAD.//;h;s/./-/g;H;g;}' -e 's/ *$$//' > $(sdir_top)/META-FAQ
+ test -f $(sdir_top)/META-FAQ
+$(YODLDOC): $(YODLSRC) version.yo
+version.yo: $(sdir_top)/Config/version.mk
+ ( \
+ echo 'STARTDEF()'; \
+ echo 'def(version)(0)('$(VERSION)')'; \
+ echo 'def(date)(0)('$(VERSION_DATE)')'; \
+ echo 'ENDDEF()#' | tr '#' '\\'; \
+ ) > $(sdir)/version.yo
+# ========== DEPENDENCIES FOR INSTALLING ==========
+# install all the documentation
+install: install.man install.info
+# uninstall all the documentation
+uninstall: uninstall.man uninstall.info
+# install man pages, creating install directory if necessary
+install.man: $(MAN)
+ $(sdir_top)/mkinstalldirs $(mandir)/man1
+ for file in $(MAN); do \
+ if test -f $$file; then \
+ $(INSTALL_DATA) $$file $(mandir)/man1; \
+ elif test -f $(sdir)/$$file; then \
+ $(INSTALL_DATA) $(sdir)/$$file $(mandir)/man1; \
+ else :; \
+ fi || exit 1; \
+ done
+# install info pages, creating install directory if necessary
+install.info: zsh.info
+ $(sdir_top)/mkinstalldirs $(infodir)
+ for file in zsh.info zsh.info-[1-9]; do \
+ if test -f $$file; then \
+ $(INSTALL_DATA) $$file $(infodir); \
+ elif test -f $(sdir)/$$file; then \
+ $(INSTALL_DATA) $(sdir)/$$file $(infodir); \
+ else :; \
+ fi || exit 1; \
+ done
+# uninstall man pages
+ for file in $(MAN); do \
+ rm -f $(mandir)/man1/$$file; \
+ done
+# uninstall info pages
+ rm -f $(infodir)/zsh.info $(infodir)/zsh.info-[1-9]
+# ========== DEPENDENCIES FOR CLEANUP ==========
+ rm -f *.html *.info* *.dvi *.ps
+ rm -f *.aux *.cp *.cps *.fn *.fns *.ky *.log
+ rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
+ rm -f Makefile
+ cd $(sdir) && rm -f version.yo *.1 *.texi ../META-FAQ
+# ========== DEPENDENCIES FOR MAINTENANCE ==========
diff --git a/Doc/Zsh/.distfiles b/Doc/Zsh/.distfiles
new file mode 100644
index 000000000..42517f507
--- /dev/null
+++ b/Doc/Zsh/.distfiles
@@ -0,0 +1,9 @@
+ .distfiles
+ arith.yo builtins.yo compat.yo compctl.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_sched.yo
+ mod_stat.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/.lastloc b/Doc/Zsh/.lastloc
new file mode 100644
index 000000000..8b1a784a8
--- /dev/null
+++ b/Doc/Zsh/.lastloc
@@ -0,0 +1 @@
+(("/home/user2/pws/src/zsh-3.1.5/Doc/Zsh/expn.yo" . 33735))
diff --git a/Doc/Zsh/arith.yo b/Doc/Zsh/arith.yo
new file mode 100644
index 000000000..1560c81d3
--- /dev/null
+++ b/Doc/Zsh/arith.yo
@@ -0,0 +1,73 @@
+texinode(Arithmetic Evaluation)(Conditional Expressions)(Jobs & Signals)(Top)
+chapter(Arithmetic Evaluation)
+sect(Arithmetic Evaluation)
+cindex(arithmetic evaluation)
+cindex(evaluation, arithmetic)
+An ability to perform integer arithmetic is provided with the builtin tt(let).
+findex(let, use of)
+Evaluations are performed using em(long) arithmetic.
+A leading `tt(0x)' or `tt(0X)' denotes hexadecimal.
+Otherwise, numbers are of the form `[var(base)tt(#)]var(n)',
+where var(base) is a decimal number between two and thirty-six
+representing the arithmetic base and var(n)
+is a number in that base (for example, `tt(16#ff)' is 255 in hexadecimal).
+If var(base) is omitted
+then base 10 is used. For backwards compatibility the form
+`tt([)var(base)tt(])var(n)' is also accepted.
+cindex(arithmetic operators)
+cindex(operators, arithmetic)
+An arithmetic expression uses nearly the same syntax, precedence, and
+associativity of expressions in C.
+The following operators are supported (listed in decreasing order
+of precedence):
+sitem(tt(PLUS() - ! ~ PLUS()PLUS() --))(unary plus/minus, logical NOT, complement, {pre,post}{in,de}crement)
+sitem(tt(<< >>))(bitwise shift left, right)
+sitem(tt(&))(bitwise AND)
+sitem(tt(^))(bitwise XOR)
+sitem(tt(|))(bitwise OR)
+sitem(tt(* / %))(multiplication, division, modulus (remainder))
+sitem(tt(PLUS() -))(addition, subtraction)
+sitem(tt(< > <= >=))(comparison)
+sitem(tt(== !=))(equality and inequality)
+sitem(tt(&&))(logical AND)
+sitem(tt(|| ^^))(logical OR, XOR)
+sitem(tt(? :))(ternary operator)
+sitem(tt(= PLUS()= -= *= /= %= &= ^= |= <<= >>= &&= ||= ^^= **=))(assignment)
+sitem(tt(,))(comma operator)
+The operators `tt(&&)', `tt(||)', `tt(&&=)', and `tt(||=)' are short-circuiting,
+and only one of the latter two expressions in a ternary operator
+is evaluated. Note the precedence of the bitwise AND, OR,
+and XOR operators.
+An expression of the form `tt(#\)var(x)' where var(x) is any character
+gives the ascii value of this character and an expression of the form
+`tt(#)var(foo)' gives the ascii value of the first character of the value
+of the parameter var(foo).
+Named parameters and subscripted arrays can be referenced by name within an
+arithmetic expression without using the parameter substitution syntax.
+An internal integer representation of a named parameter
+can be specified with the tt(integer) builtin.
+cindex(parameters, integer)
+cindex(integer parameters)
+findex(integer, use of)
+Arithmetic evaluation is performed on the value of each
+assignment to a named parameter declared integer
+in this manner.
+Since many of the arithmetic operators require
+quoting, an alternative form of the tt(let) command is provided.
+For any command which begins with a tt(LPAR()LPAR()),
+all the characters until a matching tt(RPAR()RPAR())
+are treated as a quoted expression.
+More precisely, `tt(LPAR()LPAR()) ... tt(RPAR()RPAR())'
+is equivalent to `tt(let ")...tt(")'.
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
new file mode 100644
index 000000000..8959543c5
--- /dev/null
+++ b/Doc/Zsh/builtins.yo
@@ -0,0 +1,1184 @@
+texinode(Shell Builtin Commands)(Zsh Line Editor)(Options)(Top)
+chapter(Shell Builtin Commands)
+sect(Shell Builtin Commands)
+cindex(builtin commands)
+cindex(commands, builtin)
+item(tt(ARG1) var(simple command))(
+See noderef(Precommand Modifiers).
+Same as tt(ARG2).
+item(tt(.) var(file) [ var(arg) ... ])(
+Read commands from var(file) and execute them in the current shell
+If var(file) does not contain a slash, or if tt(PATH_DIRS)
+is set, the shell looks in the components of tt($path) to find the
+directory containing var(file).
+Files in the current directory are not read unless `tt(.)' appears
+somewhere in tt($path).
+If any arguments var(arg) are given,
+they become the positional parameters; the old positional
+parameters are restored when the var(file) is done executing.
+The exit status is the exit status of the last command executed.
+cindex(expanding parameters)
+cindex(parameters, expanding)
+cindex(doing nothing)
+item(tt(:) [ var(arg) ... ])(
+This command only expands parameters. A zero exit code is returned.
+cindex(aliases, defining)
+cindex(aliases, listing)
+item(tt(alias) [ tt(-gmrL) ] [ var(name)[tt(=)var(value)] ... ])(
+For each var(name) with a corresponding var(value), define an alias
+with that value. A trailing space in var(value) causes the next word
+to be checked for alias substitution. If the tt(-g) flag is present,
+define a global alias; global aliases are expanded even if they do not
+occur in command position.
+For each var(name) with no var(value),
+print the value of var(name), if any. With no arguments, print all
+currently defined aliases. If the tt(-m) flag is given the arguments
+are taken as patterns (they should be quoted to preserve them from being
+interpreted as glob patterns), and the aliases matching these patterns
+are printed. When printing aliases and the tt(-g) or tt(-r) flags
+are present, then restrict the printing to global or regular
+aliases, respectively.
+If the tt(-L) flag is present, then print each
+alias in a manner suitable for putting in a startup script. The exit
+status is nonzero if a var(name) (with no var(value)) is given for
+which no alias has been defined.
+cindex(functions, autoloading)
+cindex(autoloading functions)
+alias(autoload)(functions -u)
+cindex(jobs, backgrounding)
+xitem(tt(bg) [ var(job) ... ])
+item(var(job) ... tt(&))(
+Put each specified var(job) in the background,
+or the current job if none is specified.
+cindex(exiting loops)
+cindex(loops, exiting)
+item(tt(break) [ var(n) ])(
+Exit from an enclosing tt(for), tt(while),
+tt(until), tt(select) or tt(repeat) loop. If var(n)
+is specified, then break var(n) levels instead of just one.
+item(tt(builtin) var(name) [ var(args) ... ])(
+Executes the builtin var(name), with the given var(args).
+cindex(directories, changing)
+xitem(tt(cd) [ tt(-sLP) ] [ var(arg) ])
+xitem(tt(cd) [ tt(-sLP) ] var(old) var(new))
+item(tt(cd) [ tt(-sLP) ] {tt(PLUS())|tt(-)}var(n))(
+Change the current directory. In the first form, change the
+current directory to var(arg), or to the value of tt($HOME) if
+var(arg) is not specified. If var(arg) is `tt(-)', change to the
+value of tt($OLDPWD), the previous directory.
+If a directory named var(arg) is not found in the current directory
+and var(arg) does not begin with a slash,
+search each component of the shell parameter tt(cdpath).
+If the option tt(CDABLE_VARS) is set, and a parameter named var(arg)
+exists whose value begins with a slash, treat its value as
+the directory.
+The second form of tt(cd) substitutes the string var(new)
+for the string var(old) in the name of the current directory,
+and tries to change to this new directory.
+The third form of tt(cd) extracts an entry from the directory
+stack, and changes to that directory. An argument of the form
+`tt(PLUS())var(n)' identifies a stack entry by counting from the left
+of the list shown by the tt(dirs) command, starting with zero.
+An argument of the form `tt(-)var(n)' counts from the right.
+If the tt(PUSHD_MINUS) option is set, the meanings of `tt(PLUS())'
+and `tt(-)' in this context are swapped.
+If the tt(-s) option is specified, tt(cd) refuses to change the current
+directory if the given pathname contains symlinks. If the tt(-P) option
+is given or the tt(CHASE_LINKS) option is set, symbolic links are resolved
+to their true values. If the tt(-L) option is given symbolic links are
+followed regardless of the state of the tt(CHASE_LINKS) option.
+cindex(loops, continuing)
+cindex(continuing loops)
+item(tt(continue) [ var(n) ])(
+Resume the next iteration of the enclosing
+tt(for), tt(while), tt(until), tt(select) or
+tt(repeat) loop. If var(n) is specified, break out of
+var(n)-1 loops and resume at the var(n)th enclosing loop.
+cindex(directory stack, printing)
+item(tt(dirs) [ tt(-v) ] [ var(arg) ... ])(
+With no arguments, print the contents of the directory stack.
+If the tt(-v) option is given, number the directories
+in the stack when printing.
+Directories are added to this stack with the tt(pushd) command,
+and removed with the tt(cd) or tt(popd) commands.
+If arguments are specified, load them onto the directory stack,
+replacing anything that was there, and push the current directory
+onto the stack.
+cindex(disabling commands)
+cindex(commands, disabling)
+item(tt(disable) [ tt(-afmr) ] var(name) ...)(
+Temporarily disable the var(name)d hash table elements. The default
+is to disable builtin commands. This allows you to use an external
+command with the same name as a builtin command. The tt(-a) option
+causes tt(disable) to act on aliases. The tt(-f) option causes
+tt(disable) to act on shell functions. The tt(-r) options causes
+tt(disable) to act on reserved words. Without arguments all disabled
+hash table elements from the corresponding hash table are printed.
+With the tt(-m) flag the arguments are taken as patterns (should be
+quoted to preserve them from being taken as glob patterns), and all hash
+table elements from the corresponding hash table matching these patterns
+are disabled. Disabled objects can be enabled with the tt(enable)
+cindex(jobs, disowning)
+xitem(tt(disown) [ var(job) ... ])
+xitem(var(job) ... tt(&|))
+item(var(job) ... tt(&!))(
+Remove the specified var(job)s from the job table; the shell will
+no longer report their status, and will not complain if you
+try to exit an interactive shell with them running or stopped.
+If no var(job) is specified, disown the current job.
+item(tt(echo) [ tt(-neE) ] [ var(arg) ... ])(
+Write each var(arg) on the standard output, with a space separating
+each one.
+If the tt(-n) flag is not present, print a newline at the end.
+tt(echo) recognizes the following escape sequences:
+sitem(tt(\a))(bell character)
+sitem(tt(\c))(suppress final newline)
+sitem(tt(\f))(form feed)
+sitem(tt(\n))(linefeed (newline))
+sitem(tt(\r))(carriage return)
+sitem(tt(\t))(horizontal tab)
+sitem(tt(\v))(vertical tab)
+sitem(tt(\0)var(NNN))(character code in octal)
+sitem(tt(\x)var(NN))(character code in hexadecimal)
+pindex(BSD_ECHO, use of)
+The tt(-E) flag, or the tt(BSD_ECHO) option, can be used to disable
+these escape sequences. In the latter case, tt(-e) flag can be used to
+enable them.
+cindex(termcap string, printing)
+item(tt(echotc) var(cap) [ var(arg) ... ])(
+Output the termcap string corresponding to the capability
+var(cap), with optional arguments.
+cindex(compatibility, sh)
+cindex(compatibility, ksh)
+cindex(compatibility, csh)
+cindex(sh, compatibility)
+cindex(ksh, compatibility)
+cindex(csh, compatibility)
+item(tt(emulate) [ tt(-R) ] {tt(zsh)|tt(sh)|tt(ksh)|tt(csh)})(
+Set up zsh options to emulate the specified shell as much as possible.
+bf(csh) will never be fully emulated.
+If the argument is not one of the shells listed above, tt(zsh)
+will be used as a default. If the tt(-R) option is given, all options
+are reset to their default value corresponding to the specified emulation
+cindex(enabling commands)
+cindex(commands, enabling)
+item(tt(enable) [ tt(-afmr) ] var(name) ...)(
+Enable the var(name)d hash table elements, presumably disabled
+earlier with tt(disable). The default is to enable builtin commands.
+The tt(-a) option causes tt(enable) to act on aliases. The tt(-f)
+option causes tt(enable) to act on shell functions. The tt(-r)
+option causes tt(enable) to act on reserved words. Without arguments
+all enabled hash table elements from the corresponding hash table are
+printed. With the tt(-m) flag the arguments are taken as patterns
+(should be quoted) and all hash table elements from the corresponding
+hash table matching these patterns are enabled. Enabled objects can be
+disabled with the tt(disable) builtin command.
+cindex(evaluating arguments as commands)
+item(tt(eval) [ var(arg) ... ])(
+Read the arguments as input to the shell and execute