From: Andreas Gerler Date: Fri, 9 Feb 2024 11:01:02 +0000 (+0100) Subject: fix eshell man in tramp X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=fc17f06585198b533ca1906d223b4373c2e25e08;p=emacsconfig.git fix eshell man in tramp Signed-off-by: Andreas Gerler --- diff --git a/.gitignore b/.gitignore index 3d5899fe..e497e8fa 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,8 @@ archive-contents /cache /elpa/archives/* /eln-cache -/eshell/* +/eshell/history +/eshell/lastdir /history /mthesaur.txt.cache /org-clock-save.el* @@ -29,3 +30,4 @@ apples-tmp-dir /request/* /.org-id-locations /.#type-break +/elpa/vterm*/build diff --git a/bba-shell.org b/bba-shell.org index 9a638b49..2f1c075f 100644 --- a/bba-shell.org +++ b/bba-shell.org @@ -78,6 +78,25 @@ A little bit of code from https://github.com/bodil/emacs.d/blob/master/bodil/bod (setq eshell-history-size 5000) #+end_src +#+begin_src elisp + (defun tramp-aware-woman (man-page-path) + (interactive) + (let ((dir (eshell/pwd))) + (woman-find-file + (if (file-remote-p dir) + (let ((vec (tramp-dissect-file-name dir))) + (tramp-make-tramp-file-name + (tramp-file-name-method vec) + (tramp-file-name-user vec) + nil + (tramp-file-name-host vec) + nil + man-page-path)) + man-page-path)))) + + ;; (defalias 'eshell/man "tramp-aware-woman ${*man -w $1}") + :: (defalias 'man "woman-find-file ${*man --path $1}") +#+end_src ** [[https://codeberg.org/akib/emacs-eat/][eat]] [2024-02-05 Mon 12:10] diff --git a/eshell/alias b/eshell/alias new file mode 100644 index 00000000..16396185 --- /dev/null +++ b/eshell/alias @@ -0,0 +1,7 @@ +alias ll ls -AlohG --color=always +alias cls clear 1 +alias d dired $1 +alias find echo 'Please use fd instead.' +alias less view-file $1 +alias ll /opt/local/bin/gls -AlohG --color=always +alias man tramp-aware-woman ${*man -w $1}