diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-02-27 09:51:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-27 09:51:51 -0500 |
commit | 0ee3d6bf3cd20877870d9542d858f8abb1e7f4f1 (patch) | |
tree | 8a81fd05667659955e20b98ff015dbfebd87dee2 /cmd2.py | |
parent | 27a8a15ce6fa1ace148573110d612563a05ec516 (diff) | |
parent | 91255cd002bf65c99ea7931c3f4cda3e775b09e6 (diff) | |
download | cmd2-git-0ee3d6bf3cd20877870d9542d858f8abb1e7f4f1.tar.gz |
Merge pull request #284 from python-cmd2/instance_variables
Converted a few class variables into instance variables
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -803,8 +803,6 @@ class Cmd(cmd.Cmd): allow_cli_args = True # Should arguments passed on the command-line be processed as commands? 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', 'do__relative_load'] # Commands to exclude from the help menu reserved_words = [] # Attributes which ARE dynamically settable at runtime @@ -874,7 +872,12 @@ class Cmd(cmd.Cmd): # Call super class constructor. Need to do it in this way for Python 2 and 3 compatibility cmd.Cmd.__init__(self, completekey=completekey, stdin=stdin, stdout=stdout) + # Commands to exclude from the help menu or history command + self.exclude_from_help = ['do_eof', 'do_eos', 'do__relative_load'] + self.excludeFromHistory = '''history histor histo hist his hi h edit edi ed e eof eo eos'''.split() + self._finalize_app_parameters() + self.initial_stdout = sys.stdout self.history = History() self.pystate = {} |