Advertisement
Larvix

.disableAutoComplete [MagmaOS]

Jul 20th, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. local hct = _G.help.completeTopic
  2. local sc = shell.complete
  3. local tc = _G.textutils.complete
  4. local fc = _G.fs.complete
  5.  
  6. local function overwrite()
  7.   return {}
  8. end
  9.  
  10. _G.autocomplete = {}
  11. function _G.autocomplete.disable()
  12.   _G.help.completeTopic = overwrite  
  13.   shell.complete = overwrite  
  14.   _G.textutils.complete = overwrite
  15.   _G.fs.complete = overwrite
  16. end
  17.  
  18. function _G.autocomplete.enable()
  19.   _G.help.completeTopic = hct
  20.   shell.complete = sc
  21.   _G.textutils.complete = tc
  22.   _G.fs.complete = fc
  23. end
  24.  
  25. _G.autocomplete.disable()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement