diff --git a/commands/command.py b/commands/command.py
index c584d6feed8..90a94fd8369 100644
--- a/commands/command.py
+++ b/commands/command.py
@@ -18,6 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see .
+import copy
import sys
import datetime
import traceback
@@ -99,12 +100,21 @@ EXAMPLES = '''
creates: /path/to/database
'''
+OPTIONS = {'chdir': None,
+ 'creates': None,
+ 'executable': None,
+ 'NO_LOG': None,
+ 'removes': None,
+ 'warn': True,
+ }
+
# This is a pretty complex regex, which functions as follows:
#
# 1. (^|\s)
# ^ look for a space or the beginning of the line
-# 2. (creates|removes|chdir|executable|NO_LOG)=
-# ^ look for a valid param, followed by an '='
+# 2. ({options_list})=
+# ^ expanded to (chdir|creates|executable...)=
+# look for a valid param, followed by an '='
# 3. (?P[\'"])?
# ^ look for an optional quote character, which can either be
# a single or double quote character, and store it for later
@@ -114,8 +124,12 @@ EXAMPLES = '''
# ^ a non-escaped space or a non-escaped quote of the same kind
# that was matched in the first 'quote' is found, or the end of
# the line is reached
-
-PARAM_REGEX = re.compile(r'(^|\s)(creates|removes|chdir|executable|NO_LOG|warn)=(?P[\'"])?(.*?)(?(quote)(?[\'"])?(.*?)(?(quote)(?