summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-02-24 00:35:44 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2018-02-24 00:35:44 -0500
commitb9a98aa3412b4c0882b2e3bb89c8a10463e93c97 (patch)
tree47f68dd4288012bca1712967cac99925d24261a4
parent656a7742f0f15bf64f259e4f32b1d0a082fcfc83 (diff)
downloadcmd2-git-b9a98aa3412b4c0882b2e3bb89c8a10463e93c97.tar.gz
Fixed removed_unused.py example and help for edit command
The remove_unused.py example had become outdated since the cmdenvironment command no longer exists. The help text for the edit command was outdated since the functionality for editing previous commands got moved from the edit command to the history command. This closes #276. This closes #282.
-rwxr-xr-xcmd2.py2
-rwxr-xr-xexamples/remove_unused.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/cmd2.py b/cmd2.py
index 1c2daf7b..44f9bb1b 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -2176,7 +2176,7 @@ a..b, a:b, a:, ..b items by indices (inclusive)
@with_argument_list
def do_edit(self, arglist):
- """Edit a file or command in a text editor.
+ """Edit a file in a text editor.
Usage: edit [file_path]
Where:
diff --git a/examples/remove_unused.py b/examples/remove_unused.py
index c8c9e15e..2de0e9b6 100755
--- a/examples/remove_unused.py
+++ b/examples/remove_unused.py
@@ -19,10 +19,10 @@ class RemoveUnusedBuiltinCommands(cmd2.Cmd):
cmd2.Cmd.__init__(self)
# To hide commands from displaying in the help menu, add their function name to the exclude_from_help list
- self.exclude_from_help.append('do__relative_load')
+ self.exclude_from_help.append('do_py')
# To remove built-in commands entirely, delete their "do_*" function from the cmd2.Cmd class
- del cmd2.Cmd.do_cmdenvironment
+ del cmd2.Cmd.do_edit
if __name__ == '__main__':