summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2014-10-28 14:16:51 +0100
committerrekado <rekado@elephly.net>2014-10-28 14:16:51 +0100
commit599402691aed2407a2129124401bcc00fcfe4a27 (patch)
tree9f6012bb328e663df86f170dabe5db14ade09099
parent42c331513e49c1a7456ceb8a8d61b456e6eb70b9 (diff)
add ssh-dtach function
-rw-r--r--init.el9
1 files changed, 9 insertions, 0 deletions
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)