chiark / gitweb /
el/dot-emacs.el: Better fontification for Ediff.
[profile] / hacks / ssh
index 18f39ac0b18a6f94aa9cf42c398609594dcc751f..cbec247833500783305a32d5d1f2900421370848 100755 (executable)
--- a/hacks/ssh
+++ b/hacks/ssh
@@ -123,7 +123,7 @@ while :; do
            ;;
 
          ## These options are interesting to the master connection.
-         m,[aADLlRSwxXv]*)
+         m,[aADLlRSwxXv46]*)
            masteropts=("${masteropts[@]}" "-${o:0:1}$arg")
            ;;
 
@@ -146,7 +146,7 @@ while :; do
 
     ## A bare word.  Maybe it's the hostname, or the start of the command.
     *)
-      case ${host-t} in
+      case ${host-t}${host+nil} in
        t) host=$1 ;;
        *) break ;;
       esac
@@ -175,7 +175,8 @@ case "$mode" in
     logfile=$SSH_LOGDIR/${login+"$login@"}"$host"${port+":$port"}.log
     if ! "$REAL_SSH" -Ocheck \
       ${port+-p$port} ${login+"$login@"}"$host" \
-      >/dev/null 2>&1; then
+      >/dev/null 2>&1
+    then
       "$REAL_SSH" -MNf "${masteropts[@]}" "$host" \
        </dev/null >/dev/null 2>$logfile
     fi