diff --git a/Scripts/Bash/Functions/cli.sh b/Scripts/Bash/Functions/cli.sh index 3577095..264850b 100644 --- a/Scripts/Bash/Functions/cli.sh +++ b/Scripts/Bash/Functions/cli.sh @@ -35,7 +35,7 @@ function cli { # variables passed as second argument to the command line # interface when the format is `--option=value' without the value # part. - if [[ "$2" =~ '^-{1,2}[a-z]+=.+$' ]];then + if [[ "$2" =~ '^--[a-z-]+=.+$' ]];then # Define option name passed in the second argument. OPTIONNAM=$(echo "$2" | cut -d = -f1) @@ -49,7 +49,7 @@ function cli { # Define option name (OPTIONNAM), and option value (OPTIONVAL) # variables passed as second argument to the command line # interface when the format is `--option' without the value part. - elif [[ "$2" =~ '^-{1,2}[a-z-]+=?$' ]];then + elif [[ "$2" =~ '^--[a-z-]+=?$' ]];then # Define option name passed in the second argument. OPTIONNAM=$(echo "$2" | cut -d = -f1)