pySim-shell: print newline on exit with CTRL+D

When pySim-shell is exited using CTRL+D it does not print a newline.
This means that the prompt of the OS shell shows up after the
pySim-shell prompt. This is irretating. Lets print a new line on exit
with CTRL+D so that everything looks straight.

Change-Id: I88e58094b9badeaabd8502006e5e16f35eaa683e
This commit is contained in:
Philipp Maier 2021-11-03 10:44:39 +01:00
parent e087f909b3
commit 9764de202b
1 changed files with 4 additions and 0 deletions

View File

@ -204,6 +204,10 @@ class PysimApp(cmd2.Cmd):
"""Display the intro banner"""
self.poutput(self.intro)
def do_eof(self, _: argparse.Namespace) -> bool:
self.poutput("")
return self.do_quit('')
@cmd2.with_category(CUSTOM_CATEGORY)
def do_equip(self, opts):
"""Equip pySim-shell with card"""