Entr: rerun command when files change*

  • entr rerun command when files change
    http://eradman.com/entrproject/
    I use this a lot for all kinds of things I’m editing. It’s perfect for poking around at things until they work or until you’ve learnt how they work. I used to have my own inotify scripts to do this but I’m happy to use an off-the-shelf program now.
4 Likes

entr I forgot about – but it is fantastic, I use it less these days as more and more things I use have in-built watch.

I use entr all the time for running unit tests and miscellaneous scripts that I am working on.

Thanks to entr, I rely less on various repls when exploring new languages or libraries. Whereas previously I would often copy some lines from kakoune to a repl to find out what the lines do exactly, with entr I instead put the lines in a temporary script that is
watched and repeatedly executed by entr. This is now favourite way of using kakoune with miscellaneous programs. I simply edit some files in kakoune and have entr do something when the file changes.

2 Likes

I have a kludgy command that just reruns whatever I ran in the bottom right corner of tmux – I should probably convert over to using entr as a longer-term solution.

This is great, I’m having a field day going over all the old posts in this forum and finding so many useful tools :star_struck:

Thanks to entr, I rely less on various repls when exploring new languages or libraries

Finding a great tool like one this makes me wanna learn a new language just for the crack of it!