SSH connections allow zsh as well: this happens to work with the existing Bash.char / Bach.string operations;
authorwenzelm
Tue, 18 Mar 2025 19:07:26 +0100
changeset 82304 4fbdef3e2a55
parent 82301 bd61b838501c
child 82305 332afbd48bcf
SSH connections allow zsh as well: this happens to work with the existing Bash.char / Bach.string operations;
NEWS
src/Pure/General/ssh.scala
--- a/NEWS	Tue Mar 18 14:05:07 2025 +0100
+++ b/NEWS	Tue Mar 18 19:07:26 2025 +0100
@@ -110,6 +110,12 @@
 * Removed theory "HOL-Library.Divides" (finally).
 
 
+*** System ***
+
+* SSH connections allow both bash and zsh as remote shell. This is
+particularly important for macOS, where zsh is the default user shell.
+
+
 
 New in Isabelle2025 (March 2025)
 --------------------------------
--- a/src/Pure/General/ssh.scala	Tue Mar 18 14:05:07 2025 +0100
+++ b/src/Pure/General/ssh.scala	Tue Mar 18 19:07:26 2025 +0100
@@ -174,9 +174,9 @@
       run_ssh(master = control_master, args = "printenv HOME \";\" printenv SHELL").check.out_lines
       match {
         case List(home, shell) =>
-          if (shell.endsWith("/bash")) home
+          if (shell.endsWith("/bash") || shell.endsWith("/zsh")) home
           else {
-            error("Bad SHELL for " + quote(toString) + " -- expected GNU bash, but found " + shell)
+            error("Bad SHELL for " + quote(toString) + " -- expected bash or zsh, but found " + shell)
           }
         case _ => error("Malformed remote environment for " + quote(toString))
       }