CMD2 Persistent history InteractiveApp __init__ kwargs

Bug #1817325 reported by Puissant Clement
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cliff
New
Undecided
Unassigned

Bug Description

I'd like to use the "persistent_history_file" feature from CMD2 but cliff InteractiveApp prevent me to do so without copy pasting the whole code of the class (unless i'm missing a cleaner way to inherit and edit that without running things twice ?)

Current code:
class InteractiveApp(cmd2.Cmd):
   def __init__(self, parent_app, command_manager, stdin, stdout):
      cmd2.Cmd.__init__(self, 'tab', stdin=stdin, stdout=stdout)

What i'd expect:
class InteractiveApp(cmd2.Cmd):
   def __init__(self, parent_app, command_manager, stdin, stdout, **kwargs):
      cmd2.Cmd.__init__(self, 'tab', stdin=stdin, stdout=stdout, **kwargs)

Thanks,

Clement

Revision history for this message
Puissant Clement (nagha) wrote :

In order to access to this signature:

class Cmd(cmd.Cmd):
def __init__(self, completekey: str='tab', stdin=None, stdout=None, persistent_history_file: str='',
                 persistent_history_length: int=1000, startup_script: Optional[str]=None, use_ipython: bool=False,
                 transcript_files: Optional[List[str]]=None) -> None:

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.