X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=funcs%2Fgsu;h=b80fc919659c008420cc54d79890ea7d14ae4d7f;hb=bc4497df245d5da1b1db0f78c7a071227436ac84;hp=d72f54f4faa9dfcf30e4baf8f1608e5972cc4cc5;hpb=1d3a993452ac10a1c222c72693746a957179e2b6;p=gsu.git diff --git a/funcs/gsu b/funcs/gsu index d72f54f..b80fc91 100644 --- 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 @@ -362,7 +361,7 @@ gsu() _gsu_init_errors _gsu_check_options if [[ "$ret" -lt 0 ]]; then - if [[ "$1" != "help" && "$1" != "man" && "$1" != "prefs" ]]; then + if [[ "$1" != "help" && "$1" != "man" ]]; then gsu_err_msg exit 1 fi