diff options
author | 2011-07-28 19:50:44 +0800 | |
---|---|---|
committer | 2011-08-02 15:52:19 +0800 | |
commit | 9bfb2dbd4180e1171db2026fb58646045c1e7144 (patch) | |
tree | 11ec06d9a84e27cac0699b49e252583915680109 /scripts | |
parent | Parser: split token compositions (diff) | |
download | libbash-9bfb2dbd4180e1171db2026fb58646045c1e7144.tar.gz libbash-9bfb2dbd4180e1171db2026fb58646045c1e7144.tar.bz2 libbash-9bfb2dbd4180e1171db2026fb58646045c1e7144.zip |
Walker: support expansions without colon
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/var_expansion.bash | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/var_expansion.bash b/scripts/var_expansion.bash index f1f5e52..2d9a28e 100644 --- a/scripts/var_expansion.bash +++ b/scripts/var_expansion.bash @@ -109,3 +109,21 @@ echo $# echo a{b,c}d echo a{a,bc}d{e,}f echo a{ab,cd}d{ef,gh} +foo= +unset bar +echo ${foo-abc} +foo= +unset bar +echo ${foo+abc} +foo= +unset bar +echo ${foo=abc} +foo= +unset bar +echo ${bar-abc} +foo= +unset bar +echo ${bar+abc} +foo= +unset bar +echo ${bar=abc} |