分享一个命令行文件变更的监听工具 entr

2018-01-20 18:52:53 +08:00
 soasme

看到一个很简单易用的监听文件变更的工具 entr

目前我用过的监听工具有 watchdog, node-watch, 但讲真 entr 从接口上跟前两者相比,真是简洁到完全没有心智负担!

示例:

$ ag -l | entr make
$ ag -l | entr -s 'make && make test'
$ ls *.css *.html | entr reload-browser Firefox
$ ls *.pdf | entr pkill -HUP mupdf
$ ls *.rb | entr -r ruby main.rb
$ ls -d * | entr -c ./test.sh
3517 次点击
所在节点    Linux
5 条回复
xx2008
2018-01-20 19:08:30 +08:00
感谢分享,
Aura7988
2018-01-21 00:02:17 +08:00
谢谢分享。
shihira
2018-01-21 01:42:33 +08:00
看上去切到了不少需求痛点

虽说爱好没事儿不停按:w 或 Ctrl-S 的我来说,修改就立刻 make 有点蛋疼了啊
soasme
2018-01-21 13:02:48 +08:00
@shihira 反正机器就那么跑着,也不碍着整个流程,就当多跑了几遍 LOL
jyf007
2018-01-21 19:36:49 +08:00
不知道有什么用,先 mark

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/424560

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX