summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md2
-rwxr-xr-xcmd2.py2
-rw-r--r--tests/conftest.py4
-rw-r--r--tests/test_cmd2.py4
-rw-r--r--tests/test_transcript.py8
-rw-r--r--tests/transcripts/from_cmdloop.txt5
6 files changed, 11 insertions, 14 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f1d8bd5e..144954ac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,8 @@
* **do_*** commands get two arguments, the output of argparse.parse_known_args()
* See the **Argument Processing** section of the documentation for more information on these decorators
* Alternatively, see the **argparse_example.py** and **arg_print.py** examples
+ * The **__relative_load** command is now hidden from the help menu by default
+ * This command is not intended to be called from the command line, only from within scripts
* Deprecations
* The old **options** decorator for optparse-based argument parsing is now *deprecated*
* The old decorator is still present for now, but will eventually be removed in a future release
diff --git a/cmd2.py b/cmd2.py
index 6e3f50bf..a477ca8d 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -547,7 +547,7 @@ class Cmd(cmd.Cmd):
allow_redirection = True # Should output redirection and pipes be allowed
default_to_shell = False # Attempt to run unrecognized commands as shell commands
excludeFromHistory = '''run ru r history histor histo hist his hi h edit edi ed e eof eo eos'''.split()
- exclude_from_help = ['do_eof', 'do_eos'] # Commands to exclude from the help menu
+ exclude_from_help = ['do_eof', 'do_eos', 'do__relative_load'] # Commands to exclude from the help menu
reserved_words = []
# Attributes which ARE dynamically settable at runtime
diff --git a/tests/conftest.py b/tests/conftest.py
index 21899f36..18b38724 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -15,8 +15,8 @@ import cmd2
# Help text for base cmd2.Cmd application
BASE_HELP = """Documented commands (type help <topic>):
========================================
-_relative_load edit history py quit save shell show
-cmdenvironment help load pyscript run set shortcuts
+cmdenvironment help load pyscript run set shortcuts
+edit history py quit save shell show
"""
# Help text for the history command
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 3fc7c4ea..76efde5c 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -1099,8 +1099,8 @@ def test_custom_help_menu(help_app):
expected = normalize("""
Documented commands (type help <topic>):
========================================
-_relative_load edit history py quit save shell show
-cmdenvironment help load pyscript run set shortcuts squat
+cmdenvironment help load pyscript run set shortcuts squat
+edit history py quit save shell show
Undocumented commands:
======================
diff --git a/tests/test_transcript.py b/tests/test_transcript.py
index 0daad18a..151cf5e6 100644
--- a/tests/test_transcript.py
+++ b/tests/test_transcript.py
@@ -14,9 +14,6 @@ import mock
import pytest
import six
-# Used for sm.input: raw_input() for Python 2 or input() for Python 3
-import six.moves as sm
-
from cmd2 import (Cmd, options, Cmd2TestCase, set_use_arg_list,
set_posix_shlex, set_strip_quotes)
from conftest import run_cmd, StdOut, normalize
@@ -133,9 +130,8 @@ def test_base_with_transcript(_cmdline_app):
Documented commands (type help <topic>):
========================================
-_relative_load help mumble pyscript save shell speak
-cmdenvironment history orate quit say shortcuts
-edit load py run set show
+cmdenvironment help load orate pyscript run say shell show
+edit history mumble py quit save set shortcuts speak
(Cmd) help say
Repeats what you tell me to.
diff --git a/tests/transcripts/from_cmdloop.txt b/tests/transcripts/from_cmdloop.txt
index 5a12ca03..09072440 100644
--- a/tests/transcripts/from_cmdloop.txt
+++ b/tests/transcripts/from_cmdloop.txt
@@ -5,9 +5,8 @@
Documented commands (type help <topic>):
========================================
-_relative_load help mumble pyscript save shell speak
-cmdenvironment history orate quit say shortcuts
-edit load py run set show/ */
+cmdenvironment help load orate pyscript run say shell show/ */
+edit history mumble py quit save set shortcuts speak/ */
(Cmd) help say
Repeats what you tell me to.