]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
fix eshell man in tramp
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 9 Feb 2024 11:01:02 +0000 (12:01 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 9 Feb 2024 11:01:02 +0000 (12:01 +0100)
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
.gitignore
bba-shell.org
eshell/alias [new file with mode: 0644]

index 3d5899fec3d83ef5bfee786790fba248d38f8f09..e497e8fa5fe097bedb12d58dcd95e526a498fa47 100644 (file)
@@ -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
index 9a638b49a9511df6f6e339e080dc3829631bbb1a..2f1c075f06a9c8235008b60fe231ad363f945f23 100644 (file)
@@ -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 (file)
index 0000000..1639618
--- /dev/null
@@ -0,0 +1,7 @@
+alias ll ls -AlohG --color=always
+alias cls clear 1
+alias d dired $1
+alias find echo 'Please use fd <pattern> <paths> instead.'
+alias less view-file $1
+alias ll /opt/local/bin/gls -AlohG --color=always
+alias man tramp-aware-woman ${*man -w $1}