From 7c105189aa557af429311b78f13578650363b892 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Mon, 17 Oct 2022 21:19:37 -0700 Subject: [PATCH] Fix bug with remote login from host entry in buffer --- ha-eshell.org | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ha-eshell.org b/ha-eshell.org index 75fa46f..27f7204 100644 --- a/ha-eshell.org +++ b/ha-eshell.org @@ -1111,8 +1111,8 @@ The function to scan a line for hostname patterns uses different function calls (user2 (ha-eshell-get-expression 6)) (host2 (ha-eshell-get-expression 7))) (if host1 - (cons user1 host1) - (cons user2 host2))))))) + (list user1 host1) + (list user2 host2))))))) #+end_src Tramp reference can be long when attempting to connect as another user account using the pipe symbol. @@ -1138,12 +1138,11 @@ This function pulls it all together: Call with PREFIX to connect with the `root' useraccount, via `sudo'." (interactive "p") - (destructuring-bind (user host) (ha-eshell-scan-for-hostnames) + (seq-let (user host) (ha-eshell-scan-for-hostnames) (let ((destination (ha-eshell-host->tramp user host (> p 1)))) (message "Connecting to: %s" destination) (eshell-there destination)))) #+end_src - * Better Command Line History On [[http://www.reddit.com/r/emacs/comments/1zkj2d/advanced_usage_of_eshell/][this discussion]] a little gem for using IDO to search back through the history, instead of =M-R= to prompt for the history. #+begin_src emacs-lisp