Closed AngelEzquerra closed 7 years ago
Can you give me a use case?
An example use case would be when working compiled languages (such as nim, or autoit3 for example). In those cases you may want to just compile or to compile and run your program.
I've thought about this in the past. What I've done is made a wrapper which does it. So, I made a file called "c++run" which reads from stdin, compiles that, and then runs it. We could potentially look at bundling something like that.. would that make sense? Is this still an important use-case for you?
For compiled languages that are commonly used, we could add some basic logic to compile and execute. It would still be the same command though. What do you think?
I've added support for a shell, so if you just want to execute arbitrary commands, you could use that.
Another option is to have a file, with one line for each thing you want to do e.g. tasks.sh
containing:
ps aux
ls -lah
Then just highlight that one line, and run it with script runner. This way you can document it, keep it as part of the project, and so on.
If you have other ideas, feel free to submit a PR.
In addition to "running" a script, it would be very convenient to also add a "compile" action that would compile the current file, without running it. This would be particularly useful for non scripting languages, and for languages whose files can both be run and compiled.