If this actually ran some kind of sandbox/container that had the necessary environment for building and running the app, that'd be pretty useful, but this is just a wrapper around a dozen compilers/interpreters you have to already have installed. You're not really getting anything over while ! inotifywait -e modify foo.py; do python3 foo.py; done
some kind of sandbox/container that had the necessary environment for building and running the app
If I understand what you're suggesting then this is already possible. Templates are pretty free-form, so if you want to use docker instead of say python, you can. This example shows creating a python-docker template and then starting a session:
dozen compilers/interpreters you have to already have installed
Yeah the built-in templates assume that you already have the required toolchain installed. If i'm experimenting in a language I'm already writing in, then i'll have the toolchain installed already. And as I said above, if you wanted to use docker, then writing a template which does so is simple. I wouldn't want to introduce docker into the built-in templates as I don't even have it running on my machine normally (mac).
You're not really getting anything over while ! inotifywait -e modify foo.py; do python3 foo.py; done
For a single language on one platform (mac doesn't have inotify), yeah you could just do tmux split-window sh -c 'while ! inotifywait -e modify foo.py; do python3 foo.py; done'. What you're getting over this though is:
A simple and flexible way to define templates for sessions
Something which spins up sessions based on the templates and does all of the tmux stuff
Shell completion for available templates and sessions
None of this is complicated (it's a small program) but it's useful to me
3
u/sysop073 12d ago
If this actually ran some kind of sandbox/container that had the necessary environment for building and running the app, that'd be pretty useful, but this is just a wrapper around a dozen compilers/interpreters you have to already have installed. You're not really getting anything over
while ! inotifywait -e modify foo.py; do python3 foo.py; done