Created
September 16, 2016 14:56
-
-
Save K0HAX/0b02c856449c0997b2a2d52ff2ac1bee 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
(defun ssh-to-host (x) | |
"Ask for host." | |
(interactive "sHost: ") | |
(let* ((buffer-name (format "*SSH %s*" x)) | |
(buffer (get-buffer buffer-name))) | |
(if buffer | |
(switch-to-buffer buffer) | |
(multi-term) | |
(term-send-string | |
(get-buffer-process (rename-buffer buffer-name)) | |
(format "ssh %s\r" x))))) | |
(global-set-key (kbd "M-s s") 'ssh-to-host) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment