From 591f711886d98953756e599108e2e48c6a3506a3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 5 Mar 2022 15:10:09 +0530 Subject: [PATCH] DRYer --- shell-integration/ssh/bootstrap.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/shell-integration/ssh/bootstrap.sh b/shell-integration/ssh/bootstrap.sh index 212c70dd9..a757f8958 100644 --- a/shell-integration/ssh/bootstrap.sh +++ b/shell-integration/ssh/bootstrap.sh @@ -70,8 +70,6 @@ if [ "$tty_ok" = "y" ]; then trap 'cleanup_on_bootstrap_exit' EXIT fi -data_started="n" -data_complete="n" if [ -z "$HOSTNAME" ]; then hostname=$(command hostname 2> /dev/null) if [ -z "$hostname" ]; then @@ -91,7 +89,6 @@ if [ -z "$USER" ]; then USER=$(command whoami 2> /dev/null); fi # ask for the SSH data data_password="DATA_PASSWORD" password_filename="PASSWORD_FILENAME" -data_complete="n" leading_data="" [ "$tty_ok" = "y" ] && dcs_to_kitty "ssh" "hostname="$hostname":pwfile="$password_filename":user="$USER":pw="$data_password"" @@ -146,8 +143,7 @@ get_data() { if [ "$tty_ok" = "y" ]; then get_data - command stty "$saved_tty_settings" 2> /dev/null - saved_tty_settings="" + cleanup_on_bootstrap_exit if [ -n "$leading_data" ]; then # clear current line as it might have things echoed on it from leading_data # because we only turn off echo in this script whereas the leading bytes could