💾 Archived View for perso.pw › blog › articles › entr.gmi captured on 2023-01-29 at 04:23:26. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-17)

➡️ Next capture (2023-05-24)

🚧 View Differences

-=-=-=-=-=-=-

Port of the week: entr

NIL=> Comment on Mastodon

file change. This is useful when you are doing something that requires

some processing when you modify it.

Recently, I have used it to edit a man page. At first, I had to run

mandoc each time I modified to file to check the render. This was the

first time I edited a man page so I had to modify it a lot to get what

I wanted. I remembered about **entr** and this is how you use it:

$ ls stagit.1 | entr mandoc /_

This simple command will run "mandoc stagit.1" each time stagit.1 is

modified. The file names must be given by stdin to entr, and then use

the characters sequence **/_** to replace the names (like {} in find).

The man page of entr is very well documented if you need more

examples.