about summary refs log tree commit diff
path: root/Doc/Zsh/invoke.yo
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2017-09-11 10:12:17 +0100
committerPeter Stephenson <pws@zsh.org>2017-09-11 10:12:17 +0100
commit2ef3dff65a9fc0bc69446374473ad08e6fff4755 (patch)
treef3b00a11df3ef3d6fc43bb12c2d16a133d042e48 /Doc/Zsh/invoke.yo
parentc9df6bc8d46415e270273777c80025948762e897 (diff)
downloadzsh-2ef3dff65a9fc0bc69446374473ad08e6fff4755.tar.gz
zsh-2ef3dff65a9fc0bc69446374473ad08e6fff4755.tar.xz
zsh-2ef3dff65a9fc0bc69446374473ad08e6fff4755.zip
41668: New --emulate option on invocation.
This sets the shell emulation mode similarly to ARGV0=... which
doesn't work from other shells.

Note that this gives more comprehensive emulation than running
emulate within the shell.
Diffstat (limited to 'Doc/Zsh/invoke.yo')
-rw-r--r--Doc/Zsh/invoke.yo14
1 files changed, 14 insertions, 0 deletions
diff --git a/Doc/Zsh/invoke.yo b/Doc/Zsh/invoke.yo
index e03c1e25b..a184bc8ce 100644
--- a/Doc/Zsh/invoke.yo
+++ b/Doc/Zsh/invoke.yo
@@ -46,6 +46,20 @@ ifzman(zmanref(zshoptions))\
 ifnzman(noderef(Options))\
 .
 
+The long option `tt(--emulate)' followed (in a separate word) by an
+emulation mode may be passed to the shell.
+The emulation modes are those described for the tt(emulate) builtin,
+see
+ifzman(zmanref(zshbuiltins))\
+ifnzman(noderef(Shell Builtin Commands)).
+The `tt(--emulate)' option must precede any other options (which might
+otherwise be overridden), but following options are honoured, so
+may be used to modify the requested emulation mode.  Note that certain
+extra steps are taken to ensure a smooth emulation when this option
+is used compared with the tt(emulate) command within the shell: for
+example, variables that conflict with POSIX usage such as tt(path) are
+not defined within the shell.
+
 Options may be specified by name using the tt(-o) option.  tt(-o) acts like
 a single-letter option, but takes a following string as the option name.
 For example,