This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Cdez's profile picture

Solar OS help! Commands go where?

Started by Cdez, 22 August 2018 - 03:30 AM
Cdez #1
Posted 22 August 2018 - 05:30 AM
Hello pros,
I run the Solar OS topic, and I need help with the Solar OS project. I haven't attended to the project in a while, and I would like to get back into it. I have just pulled up my code, and realized where I stopped. I am trying to add commands to my OS, although I have no idea where they would go in my folders, and under what name(like would it be command name?).

The Repo is located here: Solar-OS-for-ComputerCraft Repo
I would greatly appreciate the help.
Original topic link: Solar OS


Thank you!

-Cdez
Windows10User #2
Posted 22 August 2018 - 12:11 PM
You can make some sort of shell and then integrate the commands into it. Protip: http://www.lua.org/manual/5.1/manual.html#5.4 You are looking for string.sub.
magiczocker #3
Posted 22 August 2018 - 04:41 PM
You can also use
os.run({test_command=function() end,another_command=function() end},path/file_to_run)
Cdez #4
Posted 22 August 2018 - 11:14 PM
I was thinking that I wanted it to be in my command prompt. I wanted the commands to be executed from Command Prompt, and to be only used in command prompt, but to be it's own separate thing(not in the code of command prompt).

Thank you for your suggestions though!