aboutsummaryrefslogtreecommitdiffhomepage
path: root/env.h
diff options
context:
space:
mode:
authorGravatar Kevin Ballard <kevin@sb.org>2014-10-02 15:59:24 -0700
committerGravatar Kevin Ballard <kevin@sb.org>2014-10-02 18:41:39 -0700
commitcfc06203e7ad7707acadd160292d47b25d6daba6 (patch)
tree387a4aa8149477309f9c545dfb9c6ccf1ea24ac1 /env.h
parent6d7a7b00d77098c93aa2b6c0deba4c18029b5a32 (diff)
Add new `functions` flag -V/--inherit-variable
--inherit-variable takes a variable name and snapshots its current value. When the function is executed, it will have a local variable with this value already defined. Printing the function source will include synthesized `set -l` lines for the values. This is primarily useful for functions that are created on the fly, such as in `psub`.
Diffstat (limited to 'env.h')
-rw-r--r--env.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/env.h b/env.h
index 8d4a41a9..e69b7fc9 100644
--- a/env.h
+++ b/env.h
@@ -166,7 +166,7 @@ public:
};
/**
- Gets the variable with the specified name, or env_var_t::missing_var if it does not exist.
+ Gets the variable with the specified name, or env_var_t::missing_var if it does not exist or is an empty array.
\param key The name of the variable to get
\param mode An optional scope to search in. All scopes are searched if unset