feat(wpcarro/emacs): Support wpcarro@wpcarro.dev in ssh.el

I'm accustomed to using vim in a GUI terminal to edit remote files. I'm trying
to ween-off of this dependency in favor of using Emacs.

Change-Id: Ib71d18135a7a9ef6ef61dfce814fffbea79a36f7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4589
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Tested-by: BuildkiteCI
This commit is contained in:
William Carroll 2021-12-24 17:35:23 -05:00 committed by clbot
parent bd85e08e3d
commit 9df5610cb7

View file

@ -41,10 +41,8 @@
;; enables ControlMaster. ;; enables ControlMaster.
(setq tramp-use-ssh-controlmaster-options nil) (setq tramp-use-ssh-controlmaster-options nil)
(defcustom ssh-hosts '("desktop") (defcustom ssh-hosts '("wpcarro@wpcarro.dev")
"List of hosts to which I commonly connect. "List of hosts to which I commonly connect.")
Note: It could be interesting to read these values from ~/.ssh-config, but
that's more than I need at the moment.")
(defun ssh-sudo-buffer () (defun ssh-sudo-buffer ()
"Open the current buffer with sudo rights." "Open the current buffer with sudo rights."
@ -58,7 +56,7 @@ Note: It could be interesting to read these values from ~/.ssh-config, but
"Prompt for an SSH host and open a dired buffer for wpcarro on that machine." "Prompt for an SSH host and open a dired buffer for wpcarro on that machine."
(interactive) (interactive)
(let ((machine (completing-read "Machine: " ssh-hosts))) (let ((machine (completing-read "Machine: " ssh-hosts)))
(find-file (format "/ssh:wpcarro@%s:~" machine)))) (find-file (format "/ssh:%s:~" machine))))
(provide 'ssh) (provide 'ssh)
;;; ssh.el ends here ;;; ssh.el ends here