Created
July 1, 2010 00:02
-
-
Save ieure/459380 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar ssh-connection-alist | |
'((shortname . "hostname.fqdn.com") | |
) | |
"Alist of SSH connections. | |
Format is ((NAME . HOSTSPEC) …)") | |
(defun ssh-convenience () | |
"Make SSH convenience functions." | |
(interactive) | |
(mapcar (lambda (conn) | |
(let ((name (symbol-name (car conn))) | |
(host (cdr conn))) | |
(fset (intern name) | |
`(lambda nil | |
,(format "Connect to %s SSH preset." name) | |
(interactive) | |
(ssh ,host))))) | |
ssh-connection-alist)) | |
(ssh-convenience) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment