GitHub: https://github.com/eradman, also:
rset(1): http://scriptedconfiguration.org/ - Configure systems using any scripting language
GitHub: https://github.com/eradman, also:
rset(1): http://scriptedconfiguration.org/ - Configure systems using any scripting language
I study Feedback Loops, and the incredible ease of saying "run this program when those files change" has been revolutionary. Auto-deploy when a Terraform file changes, or auto-test when a Python file changes. Wonderful!
- it's unix only, which, when using a multi-plateform language like python, is limitating
- can't be used programmatically without subprocess hacks
If you use Python, watchdog is an interesting alternative:
- it works were Python works: pretty much everywhere
- it uses the best API for the job (e.g: inotify on linux), but will fallback on manual scanning in a thread if the underlying OS has no special file system watcher API
- it's a lib that can be use programmatically
- it features the command "watchmedo", which is basically what entr does, but with an optional rich file format and plugin system
- for simple use cases, all that stuff stays super simple
1. Configure vim to touch a well-known file on save. 2. Create a command `w` which reruns it's arguments whenever that file is touched.
I must run hundreds of reruns under this setup every day. Basically every language, every too, everything runs on this. Changing my NixOS config? `w sudo nixos-rebuild test` Writing rust? `w cargo ltest` running terraform? `terraform init && w terraform plan`.