diff --git a/Scripts/Bash/Functions/cli_doParseArgumentsCommon.sh b/Scripts/Bash/Functions/cli_doParseArgumentsCommon.sh index 3060823..ca0f51e 100755 --- a/Scripts/Bash/Functions/cli_doParseArgumentsCommon.sh +++ b/Scripts/Bash/Functions/cli_doParseArgumentsCommon.sh @@ -165,7 +165,11 @@ function cli_doParseArgumentsCommon { # Redefine ARGUMENTS to use no-common arguments. Common arguments # has been already parsed, so free specific functions from parsing # them (there is no need to parse them twice). - eval set -- "$(echo $ARGUMENTS_DEFAULT | sed -r "s!${COMMONS}!!g")" + if [[ $COMMONS != '' ]];then + eval set -- "$(echo $ARGUMENTS_DEFAULT | sed -r "s!${COMMONS}!!g")" + else + eval set -- "${ARGUMENTS_DEFAULT}" + fi # Redefine positional parameters stored inside ARGUMENTS variable. cli_doParseArgumentsReDef "$@"