From: Andreas Gerler Date: Tue, 25 Nov 2025 18:30:10 +0000 (+0100) Subject: eshell remote cd X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=5261ac6efeff5e8607c5b13e4c5e4aa67ab900a9;p=emacsconfig.git eshell remote cd * bba-shell.org: cd- to cd / on remote hosts easily. --- diff --git a/bba-shell.org b/bba-shell.org index e69f0098..9a253d6e 100644 --- a/bba-shell.org +++ b/bba-shell.org @@ -113,6 +113,16 @@ A little bit of code from https://github.com/bodil/emacs.d/blob/master/bodil/bod (shell-command "git stash pop"))) #+end_src +#+begin_src elisp + (defun eshell/cd- (new-path) + (let* ((d default-directory) + (s (split-string d ":")) + (path (car (last s))) + (l (length path)) + (host (substring d 0 (- (length d) l)))) + (eshell/cd (format "%s%s" host new-path)))) +#+end_src + ** [[https://codeberg.org/akib/emacs-eat/][eat]] [2024-02-05 Mon 12:10]