From cf92384eac7c961d96a9bf3bde3df8f8427b45bc Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 13 Apr 2000 14:22:47 +0000 Subject: 10738: pws: local parameters can be exported --- Doc/Zsh/builtins.yo | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'Doc/Zsh/builtins.yo') diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index cb7372cc5..0eadbc596 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -595,9 +595,10 @@ sitem([var(mm)tt(:)]var(ss))(minutes and seconds) endsitem() ) findex(local) -item(tt(local) [ {tt(PLUS())|tt(-)}tt(AEFLRUZahilrtu) [var(n)]] [ var(name)[tt(=)var(value)] ] ...)( -Same as tt(typeset), except that the options tt(-g), tt(-x) and -tt(-f) are not permitted. +item(tt(local) [ {tt(PLUS())|tt(-)}tt(AEFLRUZahilrtux) [var(n)]] [ var(name)[tt(=)var(value)] ] ...)( +Same as tt(typeset), except that the options tt(-g), and +tt(-f) are not permitted. In this case the tt(-x) option does not force +the use of tt(-g), i.e. exported variables will be local to functions. ) findex(log) vindex(watch, use of) @@ -1003,9 +1004,7 @@ var(name) (even those that already exist), and is unset again when the function completes. See ifzman(`Local Parameters' in zmanref(zshparam))\ ifnzman(noderef(Local Parameters))\ -. Local parameters are not exported unless tt(ALL_EXPORT) is set, in -which case the parameter is exported em(only) when var(name) does not -already exist. The same rules apply to special shell parameters, which +. The same rules apply to special shell parameters, which retain their special attributes when made local. For each var(name)tt(=)var(value) assignment, the parameter @@ -1161,7 +1160,9 @@ This flag has a different meaning when used with tt(-f); see above. ) item(tt(-x))( Mark for automatic export to the environment of subsequently -executed commands. +executed commands. Currently this implies the option tt(-g), unless tt(+g) +is also explicitly given, in other words the parameter is not made local to +the enclosing function. This is for compatibility with other shells. ) enditem() ) -- cgit 1.4.1