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

[settings API] Adding custom files to shell. and startup files

Started by wilcomega, 05 February 2016 - 12:57 PM
wilcomega #1
Posted 05 February 2016 - 01:57 PM
I suggest there should be another settings file, or a "." seperated category to add new files and folders to the shell at startup.
for example, here is how you would add a file to the sub directory:

set "shell.path.myeditor" "/myprograms/myeditor"
now you can execute "myeditor" from anywhere in the shell, the next time you reboot. you can give it any name you want just add "shell.path." in front.

Same goes for the startup sequence, you should be able to add files to the startup sequence and set some additional parameters, here is a settings path and value layout:

shell.startup.<id> - this id is a string that is used to uniquely identify your program
shell.startup.<id>.name - string - gives a name for humans to read
shell.startup.<id>.priority - number - entries with lower numbers have higher priority
shell.startup.<id>.path - string - the path to the file to execute
shell.startup.<id>.target - number - 0=main window 1=new window 2=background
shell.startup.<id>.arguments - string - the arguments to give the program

this allows for more versatile setups, and would be a nice standardization instead of having a startup file handle this.
EveryOS #2
Posted 11 April 2016 - 12:57 PM
Sounds cool.