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

About Autocomplete

Started by setzer_bomb, 19 August 2015 - 09:46 AM
setzer_bomb #1
Posted 19 August 2015 - 11:46 AM
Well, I know that the autocomplete feature is great, and to people that are learning it's very helpful, but I want to disable this feature in my server, I tried to find a way, but I can't. So, do somebody knows how to disable?

Thanks, and sorry for english mistakes.
Lupus590 #2
Posted 19 August 2015 - 08:54 PM
From my understanding, the read function provides the auto complete. If you overwrite the read function you can have it filter out the auto complete arguments.
You will need to put your change in a resource pack and put this resource pack on the server.
valithor #3
Posted 19 August 2015 - 10:00 PM
The way I have seen/used to disable the autocomplete feature is as follows:


_G.completion = {}
local oldfscomplete = fs.complete
local oldshellcomplete = shell.complete
local oldtextutilscomplete = textutils.complete

local function overwrite()
  return {}
end

function _G.completion.overwrite()
  fs.complete = overwrite
  shell.complete = overwrite
  textutils.complete = overwrite
end

function _G.completion.restore()
  fs.complete = oldfscomplete
  shell.complete = oldshellcomplete
  textutils.complete = oldtextutilscomplete
end

_G.completion.overwrite()

You would put that code in the autorun folder in a resource pack. What this does is add two new functions "overwrite" and "restore" the first removes completion and the second restores its functionality. This code should work assuming I did not make any typos while writing it. Either way you should get the general idea of what it does.
Edited on 19 August 2015 - 08:27 PM