From 3a9ac25f60507fa32c70c04c5226b99ed0e91093 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Sep 19 2012 17:19:22 +0000 Subject: Update `Functions/Commons/cli_printActionPreamble.sh' file. --- diff --git a/Scripts/Bash/Functions/Commons/cli_printActionPreamble.sh b/Scripts/Bash/Functions/Commons/cli_printActionPreamble.sh index 7aaf188..5002cd3 100755 --- a/Scripts/Bash/Functions/Commons/cli_printActionPreamble.sh +++ b/Scripts/Bash/Functions/Commons/cli_printActionPreamble.sh @@ -34,10 +34,6 @@ function cli_printActionPreamble { # Define long options. local ARGSL='to-create,to-delete,to-locale,to-edit' - # Initialize arguments with an empty value and set it as local - # variable to this function scope. - local ARGUMENTS='' - # Initialize message. local MESSAGE='' @@ -49,10 +45,15 @@ function cli_printActionPreamble { # that will be affected by the action. local FILE='' - # Redefine ARGUMENTS variable using current positional parameters. + # Initialize arguments with an empty value and set it as local + # variable to this function scope. Doing this is very important to + # avoid any clash with higher execution environments. + local ARGUMENTS='' + + # Prepare ARGUMENTS for getopt. cli_parseArgumentsReDef "$@" - # Redefine ARGUMENTS variable using getopt output. + # Redefine ARGUMENTS using getopt(1) command parser. cli_parseArguments # Redefine positional parameters using ARGUMENTS variable.