Skip to content

Commit b9a98aa

Browse files
committed
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.
1 parent 656a774 commit b9a98aa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cmd2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2176,7 +2176,7 @@ def do_history(self, args):
21762176

21772177
@with_argument_list
21782178
def do_edit(self, arglist):
2179-
"""Edit a file or command in a text editor.
2179+
"""Edit a file in a text editor.
21802180
21812181
Usage: edit [file_path]
21822182
Where:

examples/remove_unused.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ def __init__(self):
1919
cmd2.Cmd.__init__(self)
2020

2121
# To hide commands from displaying in the help menu, add their function name to the exclude_from_help list
22-
self.exclude_from_help.append('do__relative_load')
22+
self.exclude_from_help.append('do_py')
2323

2424
# To remove built-in commands entirely, delete their "do_*" function from the cmd2.Cmd class
25-
del cmd2.Cmd.do_cmdenvironment
25+
del cmd2.Cmd.do_edit
2626

2727

2828
if __name__ == '__main__':

0 commit comments

Comments
 (0)