Skip to content

Commit

Permalink
fix: Prevent cmd exiting after a successful connection (#107)
Browse files Browse the repository at this point in the history
This commit fix #103 which causes the command line to exit after successfully
opening a connection.

Signed-off-by: hyx0329 <[email protected]>
  • Loading branch information
hyx0329 authored Jul 26, 2022
1 parent ddf57cd commit b4e47ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mp/mpfshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 170,12 @@ def __parse_file_names(self, args):

return None

def postcmd(self, stop, line):
# keep the shell open until manually exited
if line.startswith("exit") or line.startswith("EOF"):
return True
return False

def do_exit(self, args):
"""exit
Exit this shell.
Expand Down

0 comments on commit b4e47ff

Please sign in to comment.