Weird that just 3 days ago https://github.com/makalin/preexec was released with almost exactly the same functionality written in Go.