diff --git a/extr b/extr index 54b254c..854df8a 100755 --- a/extr +++ b/extr @@ -48,7 +48,7 @@ function extr_register_module(){ function extr_register_extensions(){ extr_is_module_registered "$1" || return 1 - eval export "EXTR_EXTENSIONS_$1"='$'"2" + eval export "EXTR_EXTENSIONS_$1"='"$'"2"'"' } function regex_match(){ local haystack="$1" @@ -148,7 +148,7 @@ function fatal_error(){ function do_file_extension(){ local file="$1" for module in "${EXTR_LOADED_MODULES[@]}";do - eval regex_match "$file" '$'"EXTR_EXTENSIONS_$module" + eval regex_match "\"$file\"" '"$'"EXTR_EXTENSIONS_$module"'"' if [ $? -eq 0 ];then eval "do_$module" retval=$?