(setq eshell-prompt-regexp "^[^#$\n]+[#$] ")
#+END_SRC
+#+begin_src elisp
+ (setq eshell-history-size 5000)
+#+end_src
** Most of this stolen from the great [[https://github.com/howardabrams/hamacs/blob/main/ha-eshell.org][Howard Abrams]]!
#+end_src
Yeah, the variable =$*= doesn’t work as you’d expect, so use =$1= when calling Emacs functions that take one parameter).
For instance, while I would like to have the following, the real solution is to make functions (see [[Less and More][below for details]]).
-#+begin_src sh
- alias less view-file
+#+begin_src shell :tangle ~/.emacs.d/eshell/alias
+ alias less view-file $1
#+end_src
Third, you want more /control/, you can use the help:eshell/alias function, but it doesn’t honor =$1= and other parameters, so we could create conditionally create function that we add to the [[help:eshell-mode-hook][eshell-mode-hook]], for instance: