fixing regular expression matches to use regular expression syntax instead of globbing syntax

This commit is contained in:
Tom Scogland
2015-06-09 09:07:58 -07:00
committed by Thomas R. W. Scogland
parent e64c0f4e4e
commit b98454b8b2

View File

@@ -64,7 +64,7 @@ function spack {
done
# h and V flags don't require further output parsing.
if [[ "$_sp_flags" =~ *h* || "$_sp_flags" =~ *V* ]]; then
if [[ (! -z "$_sp_flags") && ("$_sp_flags" =~ '.*h.*' || "$_sp_flags" =~ '.*V.*') ]]; then
command spack $_sp_flags "$@"
return
fi