Skip to content

Commit 1da9045

Browse files
committed
Cleanup of documentation and examples
Removed usage of and reference to attributes and commands which have now been removed.
1 parent 51e7176 commit 1da9045

File tree

8 files changed

+5
-20
lines changed

8 files changed

+5
-20
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ example/transcript_regex.txt:
236236
# regexes on prompts just make the trailing space obvious
237237
(Cmd) set
238238
abbrev: True
239-
autorun_on_edit: False
240239
colors: /(True|False)/
241240
continuation_prompt: >/ /
242241
debug: False

cmd2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1478,7 +1478,6 @@ def path_complete(self, text, line, begidx, endidx, dir_exe_only=False, dir_only
14781478
# Enable tab completion of paths for relevant commands
14791479
complete_edit = path_complete
14801480
complete_load = path_complete
1481-
complete_save = path_complete
14821481

14831482
# noinspection PyUnusedLocal
14841483
@staticmethod

docs/freefeatures.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Script files
1313
============
1414

1515
Text files can serve as scripts for your ``cmd2``-based
16-
application, with the ``load``, ``_relative_load``, ``save``, and ``edit`` commands.
16+
application, with the ``load``, ``_relative_load``, ``edit`` and ``history`` commands.
1717

1818
Both ASCII and UTF-8 encoded unicode text files are supported.
1919

@@ -23,10 +23,10 @@ Simply include one command per line, typed exactly as you would inside a ``cmd2`
2323

2424
.. automethod:: cmd2.Cmd.do__relative_load
2525

26-
.. automethod:: cmd2.Cmd.do_save
27-
2826
.. automethod:: cmd2.Cmd.do_edit
2927

28+
.. automethod:: cmd2.Cmd.do_history
29+
3030

3131
Comments
3232
========
@@ -257,12 +257,10 @@ also provide `bash-like history list editing`_.
257257

258258
.. _`bash-like history list editing`: http://www.talug.org/events/20030709/cmdline_history.html
259259

260-
``cmd2`` makes a third type of history access available, consisting of these commands:
260+
``cmd2`` makes a third type of history access available with the **history** command:
261261

262262
.. automethod:: cmd2.Cmd.do_history
263263

264-
.. automethod:: cmd2.Cmd.do_run
265-
266264
Quitting the application
267265
========================
268266

@@ -328,7 +326,6 @@ Tab-Completion
328326
- ``edit``
329327
- ``load``
330328
- ``pyscript``
331-
- ``save``
332329
- ``shell``
333330

334331
``cmd2`` also adds tab-completion of shell commands to the ``shell`` command.

docs/settingchanges.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ with::
117117

118118
(Cmd) set --long
119119
abbrev: False # Accept abbreviated commands
120-
autorun_on_edit: False # Automatically run files after editing
121120
colors: True # Colorized output (*nix only)
122121
continuation_prompt: > # On 2nd+ line of input
123122
debug: False # Show full error stack on error

examples/exampleSession.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# regexes on prompts just make the trailing space obvious
55
(Cmd) set
66
abbrev: False
7-
autorun_on_edit: False
87
colors: /(True|False)/
98
continuation_prompt: >/ /
109
debug: False

examples/python_scripting.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def __init__(self):
2828
# Enable the optional ipy command if IPython is installed by setting use_ipython=True
2929
Cmd.__init__(self, use_ipython=True)
3030
self._set_prompt()
31-
self.autorun_on_edit = False
3231
self.intro = 'Happy 𝛑 Day. Note the full Unicode support: 😇 (Python 3 only) 💩'
3332

3433
def _set_prompt(self):

examples/transcript_regex.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# regexes on prompts just make the trailing space obvious
55
(Cmd) set
66
abbrev: True
7-
autorun_on_edit: False
87
colors: /(True|False)/
98
continuation_prompt: >/ /
109
debug: False

tests/test_cmd2.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def test_history_output_file(base_app):
320320
run_cmd(base_app, 'help')
321321
run_cmd(base_app, 'shortcuts')
322322
run_cmd(base_app, 'help history')
323-
323+
324324
fd, fname = tempfile.mkstemp(prefix='', suffix='.txt')
325325
os.close(fd)
326326
run_cmd(base_app, 'history -o "{}"'.format(fname))
@@ -613,12 +613,6 @@ def test_pipe_to_shell(base_app, capsys):
613613
if sys.platform == "win32":
614614
# Windows
615615
command = 'help | sort'
616-
# Get help menu and pipe it's output to the sort shell command
617-
# expected = ['', '', '_relative_load edit history py quit save shell show',
618-
# '========================================',
619-
# 'cmdenvironment help load pyscript run set shortcuts',
620-
# 'Documented commands (type help <topic>):']
621-
# assert out == expected
622616
else:
623617
# Mac and Linux
624618
# Get help on help and pipe it's output to the input of the word count shell command

0 commit comments

Comments
 (0)