about summary refs log tree commit diff
path: root/Doc/Zsh/builtins.yo
diff options
context:
space:
mode:
authorAndrey Borzenkov <bor@users.sourceforge.net>2009-01-25 18:19:28 +0000
committerAndrey Borzenkov <bor@users.sourceforge.net>2009-01-25 18:19:28 +0000
commit665b7d1f93da0f62b9908e467d350f8b4d6ef822 (patch)
tree139135a284057c41206f59a449c085b379d7b363 /Doc/Zsh/builtins.yo
parent7d8db3f1a326685d884ff11e8b2e13f9c3401b5f (diff)
downloadzsh-665b7d1f93da0f62b9908e467d350f8b4d6ef822.tar.gz
zsh-665b7d1f93da0f62b9908e467d350f8b4d6ef822.tar.xz
zsh-665b7d1f93da0f62b9908e467d350f8b4d6ef822.zip
26425: allow "emulate sh -c command" to eval command under sh emulation
Diffstat (limited to 'Doc/Zsh/builtins.yo')
-rw-r--r--Doc/Zsh/builtins.yo20
1 files changed, 14 insertions, 6 deletions
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index d4d2a4c9c..6d1547de6 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -338,8 +338,11 @@ cindex(compatibility, csh)
 cindex(sh, compatibility)
 cindex(ksh, compatibility)
 cindex(csh, compatibility)
-item(tt(emulate) [ tt(-LR) ] {tt(zsh)|tt(sh)|tt(ksh)|tt(csh)})(
-Set up zsh options to emulate the specified shell as much as possible.
+item(tt(emulate) [ tt(-LR) ] [ {tt(zsh)|tt(sh)|tt(ksh)|tt(csh)} [ tt(-c) tt(arg) ] ])(
+Without any argument print current emulation mode.
+
+With single argument 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; more precisely, the tests performed on the
@@ -351,16 +354,21 @@ the section `Compatibility' in zmanref(zshmisc)
 ifnzman(\
 noderef(Compatibility)
 )\
-.  If the tt(-R) option is given, all options
+.
+
+If tt(-c) tt(arg) is given, evaluate tt(arg) after temporary setting
+requested emulation. Emulation will be restored before tt(emulate) returns.
+
+If the tt(-R) option is given, all options
 are reset to their default value corresponding to the specified emulation
 mode, except for certain options describing the interactive
 environment; otherwise, only those options likely to cause portability
-problems in scripts and functions are altered.  If the tt(-L) option
-is given, the options tt(LOCAL_OPTIONS) and tt(LOCAL_TRAPS) will be set as
+problems in scripts and functions are altered.  If the tt(-L) option is given,
+the options tt(LOCAL_OPTIONS) and tt(LOCAL_TRAPS) will be set as
 well, causing the effects of the tt(emulate) command and any tt(setopt) and
 tt(trap) commands to be local to the immediately surrounding shell
 function, if any; normally these options are turned off in all emulation
-modes except tt(ksh).
+modes except tt(ksh). The tt(-L) and tt(-c) are mutually exclusive.
 )
 findex(enable)
 cindex(enabling commands)