about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-05-08 10:02:58 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-05-08 10:02:58 +0000
commit8ce657c2cbbd194532be36343fd7f1882513541e (patch)
tree6f40e8283b1bb6bf202bec586fcf3c21e09c3cba /Doc
parente4cdad9700342b4dbc1837307580134eee274f33 (diff)
downloadzsh-8ce657c2cbbd194532be36343fd7f1882513541e.tar.gz
zsh-8ce657c2cbbd194532be36343fd7f1882513541e.tar.xz
zsh-8ce657c2cbbd194532be36343fd7f1882513541e.zip
Phil Pennock + tweaks: 23398 + more tweaks: exec compatibility options
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/builtins.yo9
-rw-r--r--Doc/Zsh/grammar.yo53
2 files changed, 47 insertions, 15 deletions
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index dde13b47a..0f90bca6d 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -6,7 +6,6 @@ sect(Shell Builtin Commands)
 cindex(builtin commands)
 cindex(commands, builtin)
 def(prefix)(1)(\
-findex(ARG1)
 item(tt(ARG1) var(simple command))(
 See noderef(Precommand Modifiers).
 )\
@@ -375,7 +374,13 @@ item(tt(eval) [ var(arg) ... ])(
 Read the arguments as input to the shell and execute the resulting
 command in the current shell process.
 )
-prefix(exec)
+item(tt(exec) [ tt(-cl) ] [ tt(-a) var(argv0) ] var(simple command))(
+Replace the current shell with an external command rather than forking.
+With tt(-c) clear the environment; with tt(-l) prepend tt(-) to the
+tt(argv[0]) string of the command executed (to simulate a login shell);
+with tt(-a) var(argv0) set the tt(argv[0]) string of the command
+executed.  See noderef(Precommand Modifiers).
+)
 findex(exit)
 item(tt(exit) [ var(n) ])(
 Exit the shell with the exit status specified by var(n); if none
diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo
index 6138a8b9b..0c2aee960 100644
--- a/Doc/Zsh/grammar.yo
+++ b/Doc/Zsh/grammar.yo
@@ -105,29 +105,56 @@ shell builtin commands with the exception of tt(nocorrect) which is
 a reserved word.
 
 startitem()
+findex(-)
 item(tt(-))(
 The command is executed with a `tt(-)' prepended to its
 tt(argv[0]) string.
 )
-item(tt(noglob))(
-Filename generation (globbing) is not performed on any of
-the words.
+findex(builtin)
+item(tt(builtin))(
+The command word is taken to be the name of a builtin command,
+rather than a shell function or external command.
 )
+findex(command)
+item(tt(command) [ tt(-pvV) ])(
+The command word is taken to be the name of an external command,
+rather than a shell function or builtin.   If the tt(POSIX_BUILTINS) option
+is set, builtins will also be executed but certain special properties
+of them are suppressed. The tt(-p) flag causes a default path to be
+searched instead of that in tt($path). With the tt(-v) flag, tt(command)
+is similar to tt(whence) and with tt(-V), it is equivalent to tt(whence
+-v).
+)
+findex(exec)
+item(tt(exec) [ tt(-cl) ] [ tt(-a) var(argv0) ])(
+The following command together with any arguments is run in place
+of the current process, rather than as a sub-process.  The shell does not
+fork and is replaced.  The shell does not invoke tt(TRAPEXIT), nor does it
+source tt(zlogout) files.
+The options are provided for compatibility with other shells.
+
+The tt(-c) option clears the environment.
+
+The tt(-l) option is equivalent to the tt(-) precommand modifier, to
+treat the replacement command as a login shell; the command is executed
+with a tt(-) prepended to its tt(argv[0]) string.  This flag has no effect
+if used together with the tt(-a) option.
+
+The tt(-a) option is used to specify explicitly the tt(argv[0]) string
+(the name of the command as seen by the process itself) to be used by the
+replacement command and is directly equivalent to setting a value
+for the tt(ARGV0) environment variable.
+)
+findex(nocorrect)
 item(tt(nocorrect))(
 Spelling correction is not done on any of the words.  This must appear
 before any other precommand modifier, as it is interpreted immediately,
 before any parsing is done.  It has no effect in non-interactive shells.
 )
-item(tt(exec))(
-The command is executed in the parent shell without forking.
-)
-item(tt(command))(
-The command word is taken to be the name of an external command,
-rather than a shell function or builtin.
-)
-item(tt(builtin))(
-The command word is taken to be the name of a builtin command,
-rather than a shell function or external command.
+findex(noglob)
+item(tt(noglob))(
+Filename generation (globbing) is not performed on any of
+the words.
 )
 enditem()
 texinode(Complex Commands)(Alternate Forms For Complex Commands)(Precommand Modifiers)(Shell Grammar)