diff --git a/kittens/ssh/options/definition.py b/kittens/ssh/options/definition.py index 7ed5b1165..d1159abb5 100644 --- a/kittens/ssh/options/definition.py +++ b/kittens/ssh/options/definition.py @@ -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''' diff --git a/shell-integration/ssh/bootstrap.sh b/shell-integration/ssh/bootstrap.sh index 5b80b126d..c78e09576 100644 --- a/shell-integration/ssh/bootstrap.sh +++ b/shell-integration/ssh/bootstrap.sh @@ -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