From: Gabriel Filion Date: Sat, 14 May 2011 23:07:56 +0000 (-0400) Subject: ftp: output a newline on EOF when on a tty X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=65c3cba0df54c455d2848d2c4629f1a4a8a2d969;p=packages%2Fb%2Fbup.git ftp: output a newline on EOF when on a tty 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 --- diff --git a/cmd/ftp-cmd.py b/cmd/ftp-cmd.py index d63a710..18fd1b0 100755 --- a/cmd/ftp-cmd.py +++ b/cmd/ftp-cmd.py @@ -58,6 +58,7 @@ def inputiter(): try: yield raw_input('bup> ') except EOFError: + print '' # Clear the line for the terminal's next prompt break else: for line in sys.stdin: