diff options
-rwxr-xr-x | README.md | 1 | ||||
-rwxr-xr-x | cmd2.py | 1 | ||||
-rw-r--r-- | docs/freefeatures.rst | 11 | ||||
-rw-r--r-- | docs/settingchanges.rst | 1 | ||||
-rw-r--r-- | examples/exampleSession.txt | 1 | ||||
-rwxr-xr-x | examples/python_scripting.py | 1 | ||||
-rw-r--r-- | examples/transcript_regex.txt | 1 | ||||
-rw-r--r-- | tests/test_cmd2.py | 8 |
8 files changed, 5 insertions, 20 deletions
@@ -236,7 +236,6 @@ example/transcript_regex.txt: # regexes on prompts just make the trailing space obvious (Cmd) set abbrev: True -autorun_on_edit: False colors: /(True|False)/ continuation_prompt: >/ / debug: False @@ -1478,7 +1478,6 @@ class Cmd(cmd.Cmd): # Enable tab completion of paths for relevant commands complete_edit = path_complete complete_load = path_complete - complete_save = path_complete # noinspection PyUnusedLocal @staticmethod diff --git a/docs/freefeatures.rst b/docs/freefeatures.rst index e3787720..ea40c87c 100644 --- a/docs/freefeatures.rst +++ b/docs/freefeatures.rst @@ -13,7 +13,7 @@ Script files ============ Text files can serve as scripts for your ``cmd2``-based -application, with the ``load``, ``_relative_load``, ``save``, and ``edit`` commands. +application, with the ``load``, ``_relative_load``, ``edit`` and ``history`` commands. Both ASCII and UTF-8 encoded unicode text files are supported. @@ -23,10 +23,10 @@ Simply include one command per line, typed exactly as you would inside a ``cmd2` .. automethod:: cmd2.Cmd.do__relative_load -.. automethod:: cmd2.Cmd.do_save - .. automethod:: cmd2.Cmd.do_edit +.. automethod:: cmd2.Cmd.do_history + Comments ======== @@ -257,12 +257,10 @@ also provide `bash-like history list editing`_. .. _`bash-like history list editing`: http://www.talug.org/events/20030709/cmdline_history.html -``cmd2`` makes a third type of history access available, consisting of these commands: +``cmd2`` makes a third type of history access available with the **history** command: .. automethod:: cmd2.Cmd.do_history -.. automethod:: cmd2.Cmd.do_run - Quitting the application ======================== @@ -328,7 +326,6 @@ Tab-Completion - ``edit`` - ``load`` - ``pyscript`` -- ``save`` - ``shell`` ``cmd2`` also adds tab-completion of shell commands to the ``shell`` command. diff --git a/docs/settingchanges.rst b/docs/settingchanges.rst index 0a24651b..2b9f9a86 100644 --- a/docs/settingchanges.rst +++ b/docs/settingchanges.rst @@ -117,7 +117,6 @@ with:: (Cmd) set --long abbrev: False # Accept abbreviated commands - autorun_on_edit: False # Automatically run files after editing colors: True # Colorized output (*nix only) continuation_prompt: > # On 2nd+ line of input debug: False # Show full error stack on error diff --git a/examples/exampleSession.txt b/examples/exampleSession.txt index ef6df857..840bee60 100644 --- a/examples/exampleSession.txt +++ b/examples/exampleSession.txt @@ -4,7 +4,6 @@ # regexes on prompts just make the trailing space obvious (Cmd) set abbrev: False -autorun_on_edit: False colors: /(True|False)/ continuation_prompt: >/ / debug: False diff --git a/examples/python_scripting.py b/examples/python_scripting.py index 95cfce44..aa62007a 100755 --- a/examples/python_scripting.py +++ b/examples/python_scripting.py @@ -28,7 +28,6 @@ class CmdLineApp(Cmd): # Enable the optional ipy command if IPython is installed by setting use_ipython=True Cmd.__init__(self, use_ipython=True) self._set_prompt() - self.autorun_on_edit = False self.intro = 'Happy 𝛑 Day. Note the full Unicode support: 😇 (Python 3 only) 💩' def _set_prompt(self): diff --git a/examples/transcript_regex.txt b/examples/transcript_regex.txt index 27b4c639..7d017dee 100644 --- a/examples/transcript_regex.txt +++ b/examples/transcript_regex.txt @@ -4,7 +4,6 @@ # regexes on prompts just make the trailing space obvious (Cmd) set abbrev: True -autorun_on_edit: False colors: /(True|False)/ continuation_prompt: >/ / debug: False diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index 86296246..30308dd7 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -320,7 +320,7 @@ def test_history_output_file(base_app): run_cmd(base_app, 'help') run_cmd(base_app, 'shortcuts') run_cmd(base_app, 'help history') - + fd, fname = tempfile.mkstemp(prefix='', suffix='.txt') os.close(fd) run_cmd(base_app, 'history -o "{}"'.format(fname)) @@ -613,12 +613,6 @@ def test_pipe_to_shell(base_app, capsys): if sys.platform == "win32": # Windows command = 'help | sort' - # Get help menu and pipe it's output to the sort shell command - # expected = ['', '', '_relative_load edit history py quit save shell show', - # '========================================', - # 'cmdenvironment help load pyscript run set shortcuts', - # 'Documented commands (type help <topic>):'] - # assert out == expected else: # Mac and Linux # Get help on help and pipe it's output to the input of the word count shell command |