diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2000-04-13 14:22:47 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2000-04-13 14:22:47 +0000 |
commit | cf92384eac7c961d96a9bf3bde3df8f8427b45bc (patch) | |
tree | 9c8f88188a053a6979e40e1661df1e8069403de6 /Doc/Zsh/params.yo | |
parent | b692ed1b9d19d10646d3870bb3b9b301216bddf7 (diff) | |
download | zsh-cf92384eac7c961d96a9bf3bde3df8f8427b45bc.tar.gz zsh-cf92384eac7c961d96a9bf3bde3df8f8427b45bc.tar.xz zsh-cf92384eac7c961d96a9bf3bde3df8f8427b45bc.zip |
10738: pws: local parameters can be exported
Diffstat (limited to 'Doc/Zsh/params.yo')
-rw-r--r-- | Doc/Zsh/params.yo | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo index c6571f38f..ac90d095d 100644 --- a/Doc/Zsh/params.yo +++ b/Doc/Zsh/params.yo @@ -215,21 +215,19 @@ any outer parameter of the same name remains hidden. Special parameters may also be made local; they retain their special attributes unless either the existing or the newly-created parameter -has the tt(-h) (hide) attribute. This may have unexpected effects. -Firstly, there is no default value, so if there is no assigment at the +has the tt(-h) (hide) attribute. This may have unexpected effects: +there is no default value, so if there is no assigment at the point the variable is made local, it will be set to an empty value (or zero -in the case of integers). Secondly, special parameters which are made -local will not be exported (as with other parameters), so that the global -value of the parameter remains present in the environment if it is already -there. This should be particularly noted in the case of tt(PATH): the -shell will use the local version of tt(PATH) for finding programmes, but -programmes using the shell's environment will inherit the global version. +in the case of integers). The following: example(typeset PATH=/new/directory:$PATH) -is valid for temporarily allowing the shell to find the programs in -tt(/new/directory) inside a function. +is valid for temporarily allowing the shell or programmes called from it to +find the programs in tt(/new/directory) inside a function. + +Note that the restriction in older versions of zsh that local parameters +were never exported has been removed. texinode(Parameters Set By The Shell)(Parameters Used By The Shell)(Local Parameters)(Parameters) sect(Parameters Set By The Shell) |