aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMu Qiao <qiaomuf@gentoo.org>2012-03-01 15:51:58 +0800
committerMu Qiao <qiaomuf@gentoo.org>2012-03-01 15:51:58 +0800
commit62f2e7c112601d5bc7e7f5d042d4fce1e354865e (patch)
tree56a71efbe59dd1f2ab1e1e5348880f5f842cfc59 /scripts
parentParser: allow multiple operands in test expression (diff)
downloadlibbash-62f2e7c112601d5bc7e7f5d042d4fce1e354865e.tar.gz
libbash-62f2e7c112601d5bc7e7f5d042d4fce1e354865e.tar.bz2
libbash-62f2e7c112601d5bc7e7f5d042d4fce1e354865e.zip
Parser: allow empty replacement pattern
Diffstat (limited to 'scripts')
-rw-r--r--scripts/var_expansion.bash5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/var_expansion.bash b/scripts/var_expansion.bash
index 5f0bfca..e78ac8f 100644
--- a/scripts/var_expansion.bash
+++ b/scripts/var_expansion.bash
@@ -130,6 +130,11 @@ foo=
unset bar
echo ${bar=abc}
+search_paths="a%#b"
+root=123
+echo "${search_paths/%/${root}}"
+echo "${search_paths/#/${root}}"
+
# This regular expression will cause boost::exception_detail::clone_impl<boost::xpressive::regex_error>
#[[ "${version_components_groups}" =~ ("*".*" "|" *"|^2.*\ (2|\*)|^3.*\ (3|\*)) ]]
[[ " ${FUNCNAME[@]:2} " =~ " "(_python_final_sanity_checks|python_execute_function|python_mod_optimize|python_mod_cleanup)" " ]]