diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-03-01 18:44:32 -0500 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-03-01 18:44:32 -0500 |
commit | 4a6171d92be9e96717d35deea7868add1c10a407 (patch) | |
tree | cc98a0f8b3d59ea637fa1e521aaadff17f9943a1 /docs | |
parent | de5213605d04ded441783ad77e87e91539ceee68 (diff) | |
download | cmd2-git-4a6171d92be9e96717d35deea7868add1c10a407.tar.gz |
Updated docs about comments
Diffstat (limited to 'docs')
-rw-r--r-- | docs/freefeatures.rst | 16 |
1 files changed, 4 insertions, 12 deletions
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 |