Created
March 4, 2022 09:20
-
-
Save cuspymd/bea14cfdf335c5c3890fc0b17aeb71e2 to your computer and use it in GitHub Desktop.
tramp-term 수정사항
This file contains hidden or 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 tramp-term--select-host () | |
"Return a host from a list of hosts." | |
(let* ((crm-separator "@") | |
(default-host (tramp-term-default-host))) | |
(completing-read-multiple | |
(tramp-term-prompt default-host) | |
(tramp-term--parse-hosts "~/.ssh/config") | |
nil | |
nil | |
nil | |
nil | |
default-host | |
))) | |
(defun tramp-term-prompt (default-host) | |
(let ((default-string (when default-host | |
(format " (default %s)" default-host)))) | |
(concat "[user@]host" default-string ": "))) | |
(defun tramp-term-default-host () | |
(when (tramp-tramp-file-p default-directory) | |
(let* ((user (file-remote-p default-directory 'user)) | |
(host (file-remote-p default-directory 'host))) | |
(if user (format "%s@%s" user host) host)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment