]> git.tuebingen.mpg.de Git - gsu.git/blobdiff - funcs/gsu
gsu: Print the name of the invalid config variable on errors.
[gsu.git] / funcs / gsu
index 7e066f7664016186cba91db735977e36dfd5c164..b80fc919659c008420cc54d79890ea7d14ae4d7f 100644 (file)
--- a/funcs/gsu
+++ b/funcs/gsu
@@ -306,7 +306,7 @@ _gsu_check_options()
                # only.  Moreover it must not start with [a-zA-Z].
 
                ret=-$E_GSU_BAD_CONFIG_VAR
-               result="$name"
+               result="name: '$name'"
                # bash's =~ works only for 3.2 and newer, so use grep
                echo "$name" | grep '^[a-zA-Z][a-zA-Z_0123456789]*$' &> /dev/null;
                [[ $? -ne 0 ]] && return
@@ -331,8 +331,7 @@ _gsu_check_options()
                        return
                esac
 
-               eval ${gsu_config_var_prefix}_$name='"'${val:=$default_value}'"'
-
+               eval ${gsu_config_var_prefix}_$name="\"${val:=$default_value}\""
                # Check option type. ATM, only num and string are supported
                # Other types may be added without breaking compatibility
                case "$option_type" in