From 599402691aed2407a2129124401bcc00fcfe4a27 Mon Sep 17 00:00:00 2001 From: rekado Date: Tue, 28 Oct 2014 14:16:51 +0100 Subject: add ssh-dtach function --- init.el | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'init.el') diff --git a/init.el b/init.el index 51d50ba..4d5dce4 100644 --- a/init.el +++ b/init.el @@ -261,6 +261,15 @@ (when line-numbers-off-p (linum-mode -1))))) +(defun ssh-dtach (host) + "Open SSH connection to HOST and start dtach session." + (interactive) + (let ((explicit-shell-file-name "dtach") + (explicit-dtach-args '("-A" "/tmp/emacs.dtach" "-z" + "/bin/bash" "--noediting" "-login")) + (default-directory (format "/ssh:%s:" host))) + (shell (format "*ssh %s*" host)))) + ;; show time and date in modeline (display-time-mode 1) (setq display-time-day-and-date t) -- cgit v1.2.3