From 5261ac6efeff5e8607c5b13e4c5e4aa67ab900a9 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Tue, 25 Nov 2025 19:30:10 +0100 Subject: [PATCH] eshell remote cd * bba-shell.org: cd- to cd / on remote hosts easily. --- bba-shell.org | 10 ++++++++++ 1 file changed, 10 insertions(+) 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] -- 2.47.3