Commit 6e0e7f093eb2

Vincent Demeester <vincent@sbr.pm>
2026-03-02 10:46:47
feat(zsh): add mosh wrapper for shpool sessions
Added host/session syntax support to mosh via a shell function wrapper, enabling transparent shpool integration identical to the existing SSH RemoteCommand approach.
1 parent c0e9f16
Changed files (1)
dots
config
zsh
dots/config/zsh/tools/mosh.zsh
@@ -0,0 +1,15 @@
+# Mosh wrapper: support host/session syntax for shpool integration
+# Usage: mosh okinawa.sbr.pm/home → mosh okinawa.sbr.pm -- shpool-ssh-wrapper home
+has mosh || return
+
+mosh() {
+  local first="$1"
+  if [[ "$first" == */* ]]; then
+    local host="${first%%/*}"
+    local session="${first#*/}"
+    shift
+    command mosh "$host" "$@" -- shpool-ssh-wrapper "$session"
+  else
+    command mosh "$@"
+  fi
+}