From 403a41f8f2a6077d800ce7dae115a0cc3bd27a76 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 30 Sep 2013 18:48:35 +0200 Subject: whoops, save and restore the tty not console MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- got | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/got b/got index eadbe86..740e713 100755 --- a/got +++ b/got @@ -64,16 +64,16 @@ if [ "$1" = "-" ]; then . "@etc@/@command@rc" fi + tty_settings="$(stty --save)" $display_function $read_function $login_function + stty "${tty_settings}" else # cannot get any other solution to work with `login` # than to spawn a new process with the pipes pre-set tty="@dev@/$1" - tty_settings="$(stty --save)" "$0" - "$@" > "${tty}" 2> "${tty}" < "${tty}" - stty "${tty_settings}" fi -- cgit v1.2.3-70-g09d2