From e812b609f9878a1102e6411f7ada573aadfda911 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 23 Jun 2018 15:18:38 -0700 Subject: [PATCH] Update set man page to clarify scoping rules "When an exported variable goes out of scope, it is unexported." As requested in #5064 --- doc_src/set.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_src/set.txt b/doc_src/set.txt index e335abd99..e9eba414c 100644 --- a/doc_src/set.txt +++ b/doc_src/set.txt @@ -55,7 +55,7 @@ If the variable name is one or more array elements, such as `PATH[1 3 7]`, only The scoping rules when creating or updating a variable are: --# If a variable is explicitly set to either universal, global or local, that setting will be honored. If a variable of the same name exists in a different scope, that variable will not be changed. +-# Variables may be explicitly set to universal, global or local. Variables with the same name in different scopes will not be changed. -# If a variable is not explicitly set to be either universal, global or local, but has been previously defined, the previous variable scope is used. @@ -64,7 +64,7 @@ The scoping rules when creating or updating a variable are: The exporting rules when creating or updating a variable are identical to the scoping rules for variables: --# If a variable is explicitly set to either be exported or not exported, that setting will be honored. +-# Variables may be explicitly set to either exported or not exported. When an exported variable goes out of scope, it is unexported. -# If a variable is not explicitly set to be exported or not exported, but has been previously defined, the previous exporting rule for the variable is kept.