diff options
author | 2015-07-08 20:40:05 -0400 | |
---|---|---|
committer | 2015-07-08 20:40:05 -0400 | |
commit | 4412589e0c931aca94e2660c33b0325f5d630d0d (patch) | |
tree | 7c82688ca2e3332ef87389bfd6042c9d219cf03e | |
parent | bash/helpers: use __var_(push|pop) to set a temp PATH (diff) | |
download | pkgcore-4412589e0c931aca94e2660c33b0325f5d630d0d.tar.gz pkgcore-4412589e0c931aca94e2660c33b0325f5d630d0d.tar.bz2 pkgcore-4412589e0c931aca94e2660c33b0325f5d630d0d.zip |
bash: remove __var_push comment about declare usage
We could use declare statements but then we'd have to thread "-g"
arguments into all of them to make them affect the global scope from
within the __var_pop function.
-rw-r--r-- | bash/isolated-functions.lib | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/bash/isolated-functions.lib b/bash/isolated-functions.lib index 57c96d41e..765dd0e1f 100644 --- a/bash/isolated-functions.lib +++ b/bash/isolated-functions.lib @@ -216,10 +216,7 @@ __var_push() { # If the specified variable currently has a value we save it; # otherwise, just push the variable name onto the stack. if orig_val=$(declare -p ${var} 2>/dev/null); then - # We can't directly use the declare version because that forces - # scope to be localized to the function resetting the values. - # - # Posix mode needed so set only lists defined variables and not + # Posix mode needed so only defined variables are listed and not # functions too. __shopt_push -o posix orig_val=$(set | grep "^${var}=") |