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

Settings API and Auto-Complete Backports

Started by Selim, 25 January 2016 - 12:37 PM
Selim #1
Posted 25 January 2016 - 01:37 PM
I have backported the auto-complete functions in the shell, fs, and textutils APIs along with the settings API.
The shell, edit, lua and list programs that check with the settings API and use auto-complete are now included.
Currently, the only default option in setting that works would be disabling auto-complete and disabling multishell.

To install enter the Lua console and run:
loadstring(http.get("https://raw.githubusercontent.com/Selim042/CC-Backports/master/install").readAll())()
The install script will prepend your startup script if it exists and downloads the aforementioned updated programs.

WARNING:
Do NOT assume that this will work exactly like the same functions from modern versions of CC.
If you find any idiosyncrasies, please tell me, I want them to work very similar if not the same.

Please post issues on the GitHub repo.
Edited on 26 January 2016 - 01:07 PM
Lupus590 #2
Posted 25 January 2016 - 02:02 PM
Nice, thanks for this.
Selim #3
Posted 25 January 2016 - 02:36 PM
Nice, thanks for this.
Your welcome. I am currently working on a better installer that will also get the updated program files.

EDIT: Better installer complete. Check OP.
Edited on 25 January 2016 - 02:02 PM
Lupus590 #4
Posted 25 January 2016 - 05:08 PM
I made a 'pre-compiled' option, check your pull requests.

Edit: Any chance of a resource pack compatible version?
How to add this to a resource pack - A super short tutorial
(Just a quick note, I'm having issues with my version of this)
in MC, download and run the the installer (see op) (or use 'pre-compiled' version)
outside of MC, locate MC computer files
create a resource pack ( http://www.computerc...resource-packs/ )
copy files in mincraftComputer/progs to resourcepackROM/programs
copy startup from your computercraftcraft.jar and place it somewhere you can easily access (e.g. your desktop)
open minecraftComputer/startup and scroll to the bottom, delete the section below in the file
 local progs = fs.list("/progs")
for i=1, #progs do
	shell.setAlias(progs[i], "/progs/"..progs[i])
end
shell.setAlias("ls", "/progs/list") 
open startup (the one from computercraft.jar) and add to the top of it everything in minecraftComputer/startup (excluding the part we removed)
save and close both files
delete startup from minecraftComputer
place the startup you copied from computercraft.jar in your resourcepack

this won't create a default settings file, I'm looking into a fix for this
Edited on 26 January 2016 - 03:07 PM
Lupus590 #5
Posted 25 January 2016 - 06:00 PM
bug report, set program doesn't properly append to the file on first run (it wipes it), future edits seam fine though

also happens after CC computer reboots

Request, include the help documentation
Edited on 25 January 2016 - 05:03 PM
Selim #6
Posted 26 January 2016 - 02:08 PM
bug report, set program doesn't properly append to the file on first run (it wipes it), future edits seam fine though

also happens after CC computer reboots
Should be closed.
Request, include the help documentation
What do you mean?
Lupus590 #7
Posted 26 January 2016 - 02:38 PM
Request, include the help documentation
What do you mean?
The new programs have help documentation right?

also are you going to include wget? and the pastebin update/monitor program _G clutter bug fix?
Edited on 26 January 2016 - 01:47 PM
Selim #8
Posted 26 January 2016 - 03:06 PM
The new programs have help documentation right?
Ahh, that is what you meant. Yea, I will look into it.
also are you going to include wget? and the pastebin update/monitor program _G clutter bug fix?
Yes, at a later date. I am currently quite busy with other things. This is not my top priority atm. If you with to include them via pull request on the repo, feel free.
Selim #9
Posted 25 February 2016 - 03:52 AM
I have the help files included in Northbridge Terminal OS now, but it does not appear to be very simple to add the help files in a nice way for this use. As for part two, still haven't looked into that.
Edited on 25 February 2016 - 02:52 AM