These generic subcommands do not need the config file. It's pointless
to refuse to print the help e.g. if a required config variable is unset.
Also, use the name of the executable as the default value for gsu_name.
local i
_gsu_self="$(basename $0)"
+ gsu_name="${gsu_name:=$_gsu_self}"
gsu_config_var_prefix="${gsu_config_var_prefix:=$gsu_name}"
_gsu_init_errors
_gsu_check_options
if [[ "$ret" -lt 0 ]]; then
- gsu_err_msg
- exit 1
+ if [[ "$1" != "help" && "$1" != "man" && "$1" != "prefs" ]]; then
+ gsu_err_msg
+ exit 1
+ fi
fi
_gsu_available_commands
gsu_cmds="$result"