diff options
Diffstat (limited to 'Doc/Zsh/builtins.yo')
-rw-r--r-- | Doc/Zsh/builtins.yo | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index 3afe990ba..f460e48a5 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -504,6 +504,15 @@ 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. + +Note that for standards compliance a double dash does not terminate +option processing; instead, it is printed directly. However, a +single dash does terminate option processing, so the first dash, +possibly following options, is not printed, but everything following it +is printed as an argument. The single dash behaviour is different +from other shells. For a more portable way of printing text, see +tt(printf), and for a more controllable way of printing text within zsh, +see tt(print). ) module(echotc)(zsh/termcap) module(echoti)(zsh/terminfo) @@ -669,7 +678,7 @@ an empty string or whitespace) the return status is zero. item(tt(exec) [ tt(-cl) ] [ tt(-a) var(argv0) ] [ var(command) [ var(arg) ... ] ])( Replace the current shell with var(command) rather than forking. If var(command) is a shell builtin command or a shell function, -the shell executes it, then immediately exits. +the shell executes it, and exits when the command is complete. 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); @@ -1817,10 +1826,10 @@ findex(typeset) cindex(parameters, setting) cindex(parameters, declaring) redef(SPACES)(0)(tt(ifztexi(NOTRANS(@ @ @ @ @ @ @ @ ))ifnztexi( ))) -xitem(tt(typeset )[ {tt(PLUS())|tt(-)}tt(AHUaghlmprtux) ] \ -[ {tt(PLUS())|tt(-)}tt(EFLRZi) [ var(n) ] ]) +xitem(tt(typeset )[ {tt(PLUS())|tt(-)}tt(AHUaghlmrtux) ] \ +[ {tt(PLUS())|tt(-)}tt(EFLRZip) [ var(n) ] ]) xitem(SPACES()[ tt(+) ] [ var(name)[tt(=)var(value)] ... ]) -xitem(tt(typeset )tt(-T) [ {tt(PLUS())|tt(-)}tt(Uglprux) ] [ {tt(PLUS())|tt(-)}tt(LRZ) [ var(n) ] ]) +xitem(tt(typeset )tt(-T) [ {tt(PLUS())|tt(-)}tt(Uglrux) ] [ {tt(PLUS())|tt(-)}tt(LRZp) [ var(n) ] ]) xitem(SPACES()[ tt(+) | var(SCALAR)[tt(=)var(value)] var(array)[tt(=LPAR())var(value) ...tt(RPAR())] [ var(sep) ] ]) item(tt(typeset) tt(-f) [ {tt(PLUS())|tt(-)}tt(TUkmtuz) ] [ tt(+) ] [ var(name) ... ])( Set or display attributes and values for shell parameters. @@ -1980,11 +1989,16 @@ even inside a function. Note that tt(-m) is ignored if no patterns are given, so `tt(typeset -m)' displays attributes but `tt(typeset -a +m)' does not. ) -item(tt(-p))( +item(tt(-p) [ var(n) ])( If the tt(-p) option is given, parameters and values are printed in the form of a typeset command with an assignment, regardless of other flags and options. Note that the tt(-H) flag on parameters is respected; no value will be shown for these parameters. + +tt(-p) may be followed by an optional integer argument. Currently +only the value tt(1) is supported. In this case arrays and associative +arrays are printed with newlines between indented elements for +readability. ) item(tt(-T) [ var(scalar)[tt(=)var(value)] var(array)[tt(=LPAR())var(value) ...tt(RPAR())] [ var(sep) ] ])( This flag has a different meaning when used with tt(-f); see below. |