This makes the prefs command error out on invalid options
and avoids the expansion of the possibly unset parameter $1.
{
local i conf="${gsu_config_file:=$HOME/.$gsu_name.rc}"
{
local i conf="${gsu_config_file:=$HOME/.$gsu_name.rc}"
- if [[ "$1" = "-e" ]]; then
+ gsu_getopts "e"
+ eval "$result"
+ (($ret < 0)) && return
+ gsu_check_arg_count $# 0 0
+ (($ret < 0)) && return
+
+ if [[ "$o_e" == "true" ]]; then
ret=-$E_GSU_MKDIR
result="${conf%/*}"
mkdir -p "$result"
ret=-$E_GSU_MKDIR
result="${conf%/*}"
mkdir -p "$result"