Skip to content

rootmos/continuously

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

continuously

Build

A program that uses inotify and libgit2 in order to continuously execute something whenever a significant file changes.

This is a feature several modern tools already provide (e.g. Haskell's stack). However I frequently jump between (esoteric) programming languages, tools, tasks and trains of thought, and... "uhm, how does one run the tests in this project again?"

But! for me tasks, tools and languages rarely change between (git) working directories: so continuing the make tradition (or is it too old-school to try ./configure && make install whenever one obtains a new piece of software?) I keep a .k file in each such directory with relevant operations that I (frequently forget how to) execute. (I'm quite certain that this workflow emerged when having to remember relevant kubectl commands, if you know what I mean when managing several clusters etc.)

Therefore I keep my nvim open in one tmux pane and in the other a c k go (or c make sic!), where alias c='~/.local/bin/continuously --' and maybe .k:

go() {
    make build # or whatever's relevant right now
}

Thus whenever I save a file something relevant gets built.

An example of my workflow

Usage

usage: continuously [OPTION] [--] [COMMAND [ARG]...]

Run command when files change

options:
  -h  show this text
  -q  keep quiet about event and state transitions
  --  stop processing arguments

About

Run things continuously when files change

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published