mirror of
https://github.com/correl/dotfiles.git
synced 2024-11-21 19:18:41 +00:00
[emacs] eshell: cd in the context of a remote host
This commit is contained in:
parent
c63b6875f8
commit
4cf1e03211
1 changed files with 17 additions and 0 deletions
|
@ -621,6 +621,23 @@ be based on their headings.
|
|||
(add-hook 'org-babel-after-execute-hook
|
||||
'my/redisplay-org-images)
|
||||
#+end_src
|
||||
* Eshell
|
||||
** Change directory in the context of a remote host
|
||||
#+begin_src emacs-lisp
|
||||
(defun eshell/lcd (&optional directory)
|
||||
(interactive)
|
||||
(if (file-remote-p default-directory)
|
||||
(with-parsed-tramp-file-name default-directory nil
|
||||
(eshell/cd (tramp-make-tramp-file-name
|
||||
(tramp-file-name-method v)
|
||||
(tramp-file-name-user v)
|
||||
(tramp-file-name-domain v)
|
||||
(tramp-file-name-host v)
|
||||
(tramp-file-name-port v)
|
||||
(or directory "")
|
||||
(tramp-file-name-hop v))))
|
||||
(eshell/cd directory)))
|
||||
#+end_src
|
||||
* MU4E
|
||||
#+begin_src emacs-lisp
|
||||
(use-package! mu4e
|
||||
|
|
Loading…
Reference in a new issue