diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-10 22:28:05 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-10 22:28:05 +0100 |
commit | 997ee1ddd96c0496b0982c92d01b730ca21b8145 (patch) | |
tree | b01f688002c332e2061e7bc2d2207cdac0de74b3 /src | |
parent | ec8ad51d881d71c780d84719d4833e781214c31e (diff) |
allow to only have 1 option in ask_option
Diffstat (limited to 'src')
-rw-r--r-- | src/core/libs/lib-ui.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh index e79ce7b..5f2337e 100644 --- a/src/core/libs/lib-ui.sh +++ b/src/core/libs/lib-ui.sh @@ -340,7 +340,8 @@ _dia_ask_option () DEFAULT="" [ "$1" != 'no' ] && DEFAULT="--default-item $1" [ -z "$2" ] && die_error "ask_option \$2 must be the title" - [ -z "$6" ] && debug "_dia_ask_option args: $@" && die_error "ask_option makes only sense if you specify at least 2 things (with tag and name)" + #[ -z "$6" ] && debug "_dia_ask_option args: $@" && die_error "ask_option makes only sense if you specify at least 2 things (with tag and name)" #nothing wrong with only 1 option. it still shows useful info to the user + [ -z "$4" ] && debug "_dia_ask_option args: $@" && die_error "ask_option makes only sense if you specify at least one option (with tag and name)" DIA_MENU_TITLE=$2 shift 2 @@ -475,7 +476,8 @@ _cli_ask_option () DEFAULT="" [ "$1" != 'no' ] && DEFAULT=$1 #TODO: if user forgot to specify a default (eg all args are 1 pos to the left, we can end up in an endless loop :s) [ -z "$2" ] && die_error "ask_option \$2 must be the title" - [ -z "$6" ] && debug "_cli_ask_option args: $@" && die_error "ask_option makes only sense if you specify at least 2 things (with tag and name)" + #[ -z "$6" ] && debug "_cli_ask_option args: $@" && die_error "ask_option makes only sense if you specify at least 2 things (with tag and name)" #nothing wrong with only 1 option. it still shows useful info to the user + [ -z "$4" ] && debug "_dia_ask_option args: $@" && die_error "ask_option makes only sense if you specify at least one option (with tag and name)" CLI_MENU_TITLE=$2 shift 2 |