function man(args: Array):string{ var buf = ""; if(args.length == 0){ buf += "Missing arguments" } switch (args[0]){ case "help": buf += "\'help\' Prints the list of available commands\n"; break; case "clear": buf += "\'clear\' Clears the console\n"; break; case "faq": buf += "\'faq\' Prints answers to commonly asked questions about the console\n"; case "ls": buf += "\'ls\' Lists the files in the current directory, also displays if file or directory\n"; break; case "cd": buf += "\'cd (dirname/..)\' Changes the current directory\n"; break; case "echo": buf += "\'echo (arg1) (arg2) .....\' Prints the arguments to the console\n"; break; case "mkdir": buf += "\'mkdir (dirname)\' Creates a new directory in the current directory\n"; break; case "cat": buf += "\'cat (filename)\' Prints the contents of a file out to the console\n"; break; case "touch": buf += "\'touch (filename)\' Creates a new file in the current directory\n"; break; case "rm": buf += "\'rm (filename)\' Removes a file from the current directory\n"; break; case "mv": buf += "\'mv (filename from) (filename to)\' Moves a file from one directory to another\n"; break; case "cp": buf += "\'cp (filename from) (filename to)\' Copies a file from one directory to another\n"; break; case "rmdir": buf += "\'rmdir (dirname)\' Removes a directory from the current directory\n"; break; case "pwd": buf += "\'pwd\' Prints the current directory out to the console\n"; break; case "exec": buf += "\'exec (filename)\' Executes a file in the console, you can \'t use \"exit\" and \"exec\" commands\n"; break; case "spam": buf += "\'spam (number) (arg1) (arg2) .......\' Spams the console with a message from arguments\n"; break; case "overwrite": buf += "\'overwrite (filename) (arg1) (arg2) .......\' Overwrites a file with from arguments\n"; break; case "append": buf += "\'append (filename) (arg1) (arg2) .......\' Appends the arguments to a file\n"; break; case "screenshot": buf += "\'screenshot (filename)\' Takes a screenshot of the console and saves it to a file\n"; break; case "man": buf += "\'screenshot (command)\' This manual databank\n"; break; case "beep": buf += "\'beep\' This command makes a beep\n"; break; default: buf += "No such command\n" } return buf; } export {man};