diff options
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | docs/freefeatures.rst | 16 |
2 files changed, 6 insertions, 14 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b2bb782..3cc43917 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,8 @@ * Removed ability to call commands in ``pyscript`` as if they were functions (e.g ``app.help()``) in favor of only supporting one ``pyscript`` interface. This simplifies future maintenance. * No longer supporting C-style comments. Hash (#) is the only valid comment marker. - * No longer supporting comments embedded in a command. Only strings where the first non-whitespace character - is a # will be treated as comments. All other # characters will be treated as literals. + * No longer supporting comments embedded in a command. Only command line input where the first + non-whitespace character is a # will be treated as a comment. * \# this is a comment * this # is not a comment diff --git a/docs/freefeatures.rst b/docs/freefeatures.rst index c70a2d93..1d869644 100644 --- a/docs/freefeatures.rst +++ b/docs/freefeatures.rst @@ -29,21 +29,13 @@ Simply include one command per line, typed exactly as you would inside a ``cmd2` Comments ======== -Comments are omitted from the argument list -before it is passed to a ``do_`` method. By -default, both Python-style and C-style comments -are recognized. Comments can be useful in :ref:`scripts`, but would -be pointless within an interactive session. +Any command line input where the first non-whitespace character is a # will be treated as a comment. +Comments can be useful in :ref:`scripts`, but would be pointless within an interactive session. :: - def do_speak(self, arg): - self.stdout.write(arg + '\n') - -:: - - (Cmd) speak it was /* not */ delicious! # Yuck! - it was delicious! + (Cmd) # this is a comment + (Cmd) this # is not a comment .. _arg_print: https://github.com/python-cmd2/cmd2/blob/master/examples/arg_print.py |