Some extensions for the emacs shell
Go to file
eisbaer d1fa441e8c fixed a bug that occurred when the eshell command has a string in
it. the README got updated.
2023-07-06 17:40:14 +02:00
README.org fixed a bug that occurred when the eshell command has a string in 2023-07-06 17:40:14 +02:00
eshell-tricks-macros.el Code works but there is no function for removing a macro from the list. 2023-07-01 12:12:44 +02:00
eshell-tricks.el fixed a bug that occurred when the eshell command has a string in 2023-07-06 17:40:14 +02:00

README.org

What is it?

Right now it has just a history-macro functionality. That means you can say: "I want to make my last 3 eshell commands into a macro."

How to install it?

To use eshell-tricks you should copy the eshell-tricks folder into your .emacs.d directory. Then add the following lines to your init.el (or .emacs):

  (load-file "~/.emacs.d/eshell-tricks/eshell-tricks.el")
  (setq eshell-tricks-file "~/.emacs.d/eshell-tricks/eshell-tricks-macros.el")

How to use it?

Just do your usual eshell hacking. Wenn you realise you are repeating a series of commands more often you can write them in a macro with eshell/etricks-record. This is an example on how to do that:

~ $ cd example
~/example $ touch test
~/example $ ls -a
.  ..  test
~/example $ (eshell/etricks-record 'my-name 2 nil)
~/example $ (my-name)
.  ..  test
~/example $

In the above example we told the eshell/etricks-record function to create a macro for us. The created macro executes the last 2 shell commands in the order they were called in (counting starts from the function call). 'my-name is the name of the new macro and nil means we don't want to make the macro always execute in the current directory.