.bat equivalent
RuboGubo opened this issue ยท 4 comments
Useful information to include:
- Explanation of how the feature/change should work.
- Some rationale/use case for a feature. My general approach to designing new features is to ask yourself "what issue are we trying to solve" and then "is this the best way to solve this issue?".
the .bat file in essence would run commands in the terminal when the file is executed
A use case could be to run a piece of code on startup on the monitor without having to go into the original code and changing it to use a monitor.
I don't know if this is fully necessary, since all the commands that can be typed in the shell are "shortcuts" that runs programs containing Lua code.
tl; dr : Every shell command can be replicated with Lua code, is that feature necessary ?
And if someone really wanted to execute shell commands they could just write lua code that contains few shell.runs in row:
shell.run("rm something.lua")
shell.rum("dj right")
shell.run("id")
And get same effect as .bat file.
How would the code that runs the supposed .bat files be ?
The only way I could think of is :
- Read the file,
- For each line, run
shell.run(that_line)
. - Done.
I personally think this is as simple to write it yourself, and not worth implementing right now. Fully agreeing with @Wojbie, you could chain shell.run
calls to get the effect you want.