diff --git a/library/commands/command b/library/commands/command index f61bd1f7dcc..69e8362bc7f 100644 --- a/library/commands/command +++ b/library/commands/command @@ -92,6 +92,24 @@ EXAMPLES = ''' creates: /path/to/database ''' +# 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 '=' +# 3. (?P[\'"])? +# ^ look for an optional quote character, which can either be +# a single or double quote character, and store it for later +# 4. (.*?) +# ^ match everything in a non-greedy manner until... +# 5. (?(quote)(?[\'"])?(.*?)(?(quote)(?. - name: generate random string - command: python -c \"import string,random; print ''.join(random.choice(string.ascii_lowercase) for _ in xrange(8));\" + command: python -c "import string,random; print ''.join(random.choice(string.ascii_lowercase) for _ in xrange(8));" register: random_string tags: - prepare