Using the 'quit' command with ftp while in interactive mode -- attached
to a tty -- ends up clearing the line for the shell to use a fresh one
for the next prompt.
Using Ctrl-D to send an EOF to the application's input while in
interactive mode currently does not clear the line in the same way.
Let's force a newline when an EOF is received from a tty so that the
program exits in a more aesthetic way.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
try:
yield raw_input('bup> ')
except EOFError:
+ print '' # Clear the line for the terminal's next prompt
break
else:
for line in sys.stdin: