From f5b626e4a963c9f36c74123053d9b6e84f5e27bb Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Oct 07 2010 13:42:00 +0000 Subject: Update cli.sh to add long option support as in --update-headings. Specifically, update cli.sh to let the less sign - be inside options, as the one illustrated above. --- diff --git a/Scripts/Bash/Functions/cli.sh b/Scripts/Bash/Functions/cli.sh index 40d2b29..3577095 100644 --- a/Scripts/Bash/Functions/cli.sh +++ b/Scripts/Bash/Functions/cli.sh @@ -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" =~ '^-{1,2}[a-z-]+=?$' ]];then # Define option name passed in the second argument. OPTIONNAM=$(echo "$2" | cut -d = -f1)