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

Alias questions

Started by RoD, 17 May 2014 - 04:19 PM
RoD #1
Posted 17 May 2014 - 06:19 PM
Hey everyone, i am trying to disable editing among other things and i did a startup file:

function disable( cmd )
	   shell.setAlias(cmd, ".forbidden")
end
disable("cd")
disable("rm")
disable("alias")
disable("copy")
disable("edit")
disable("exit")
disable("list")
disable("lua")
disable("mkdir")
disable("monitor")
disable("move")
disable("rename")
disable("shell")
disable("pastebin")
disable("cp")
disable("dir")
disable("background")
disable("foreground")
disable("bg")
disable("fg")
disable("ls")
disable("mv")
disable("move")
disable("sh")
disable("rs")
disable("redstone")

The .forbidden file:

print("Not allowed to use this feature")

Everything works, but when someone uses the disk+boot combo: bye bye aliases…

if i type the command:

alias edit .forbidden
Wouldnt it save and work even after a reboot? Because it doesn't work on my computer.
Zudo #2
Posted 17 May 2014 - 06:23 PM
AFAIK aliases don't save across reboots.

You could just put bedrock all around the computer :P/> no one could bypass it then.
Edited on 17 May 2014 - 04:24 PM
RoD #3
Posted 17 May 2014 - 06:36 PM
AFAIK aliases don't save across reboots.

You could just put bedrock all around the computer :P/> no one could bypass it then.
I am not really into that… This is quite strange. Why would i want to set an alias for only one session? :/