Alias exit to cmd2's quit command to exit interactive shell

`exit` is a user friendly and much more intuitive way to quit the
interactive shell. It is consistent with the Python interpreter,
IPython and even OSC which provides an exit command. Applications
created using Cliff do not need to implement it. It has the same
behavior as `quit` command as it is just another name for cmd2's
`do_quit` method.

Change-Id: I19ca9d2303379838e5fbd81e9d386832727ea618
This commit is contained in:
Rajath Agasthya 2017-08-05 21:03:04 -07:00
parent dacbd601d8
commit ab919a4c2d
1 changed files with 3 additions and 0 deletions

View File

@ -118,6 +118,9 @@ class InteractiveApp(cmd2.Cmd):
self.print_topics(self.app_cmd_header, cmd_names, 15, 80)
return
# Create exit alias to quit the interactive shell.
do_exit = cmd2.Cmd.do_quit
def get_names(self):
# Override the base class version to filter out
# things that look like they should be hidden