summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--emacs/custom/my-tramp.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/emacs/custom/my-tramp.el b/emacs/custom/my-tramp.el
index ed343bc..897d48c 100644
--- a/emacs/custom/my-tramp.el
+++ b/emacs/custom/my-tramp.el
@@ -8,5 +8,17 @@
 (customize-set-variable 'tramp-histfile-override t)
 (customize-set-variable 'tramp-ssh-controlmaster-options "-o ControlMaster=auto -o ControlPath='tramp.%%C'")
 
+(defcustom my/ssh-hosts '("192.168.0.1:9922"
+                          "192.168.0.106")
+  "List of hosts I regularly connect to."
+  :type '(repeat string)
+  :group 'tramp)
+
+(defun my/ssh-cd-home ()
+  "Prompt for an SSH host and open a DIRED buffer on that machine."
+  (interactive)
+  (let ((machine (completing-read "Machine: " my/ssh-hosts)))
+    (find-file (format "/ssh:%s:~" machine))))
+
 (provide 'my-tramp)
 ;;; my-tramp.el ends here