summaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-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)