This commit is contained in:
Kovid Goyal 2022-03-04 08:31:39 +05:30
parent 603684211f
commit 64d6337612
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 3 deletions

View File

@ -31,7 +31,7 @@ When not specified options apply to all hosts, until the
first hostname specification is found. Note that the hostname this matches
against is the hostname used by the remote computer, not the name you pass
to SSH to connect to it. If you wish to include the same basic configuration for many
different hosts, you can do so with the :code:`include` directive (see :doc:`conf`).
different hosts, you can do so with the :code:`include` directive (see :doc:`/conf`).
''')
opt('+copy', '', option_type='copy', add_to_default=False, long_text=f'''

View File

@ -4,7 +4,8 @@
# read the transmitted data from STDIN
cleanup_on_bootstrap_exit() {
[ -n "$saved_tty_settings" ] && command stty "$saved_tty_settings" 2> /dev/null
[ -n "$saved_tty_settings" ] && command stty "$saved_tty_settings" 2> /dev/null < /dev/tty
saved_tty_settings=""
}
die() { printf "\033[31m%s\033[m\n\r" "$*" > /dev/stderr; cleanup_on_bootstrap_exit; exit 1; }
@ -16,7 +17,7 @@ tty_ok="n"
[ -n "$saved_tty_settings" ] && tty_ok="y"
if [ "$tty_ok" = "y" ]; then
command stty raw min 1 time 0 -echo 2> /dev/null < /dev/tty || die "stty not available"
command stty raw min 1 time 0 -echo 2> /dev/null < /dev/tty || die "stty failed to set raw mode"
trap 'cleanup_on_bootstrap_exit' EXIT
fi