From 866de228a4bbbe76e4ec26dfbb5549ea0845eace Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 16 Jul 2010 19:50:10 +0200 Subject: [PATCH] network: Optimize help function. --- functions.cli | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/functions.cli b/functions.cli index 14b764d9..9339a7bc 100644 --- a/functions.cli +++ b/functions.cli @@ -354,12 +354,13 @@ function cli_reset() { } function cli_help_requested() { - local argument - for argument in ${1}; do - if [ "${argument}" = "help" -o "${argument}" = "-h" -o "${argument}" = "--help" ]; then + local argument="${1}" + + if [ -n "${argument}" ]; then + if listmatch ${argument} help -h --help; then return ${EXIT_OK} fi - done + fi return ${EXIT_ERROR} } -- 2.47.3