Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (command === 'hi') {
- term.echo('hi there! What is your name??');
- term.push(function(command, term) {
- return term.echo(command + ' is a pretty name');
- });
- } else if (command === 'shell') {
- term.push(function(command, term) {
- if (command === 'cd') {
- return bash(term, inputs);
- }
- }, {
- prompt: '> $ '
- });
- } else if (command === 'r') {
- location.reload('forceGet');
- } else if (command === '#') {
- term.echo('which question?');
- } else if (command === 'test') {
- term.echo('I have to keep testing myself.');
- } else if (command === 'cd') {
- bash(term, inputs);
- } else if (command === "docker") {
- Docker(term, inputs);
- } else if (command === "help") {
- term.echo(help);
- } else if (command === "ls") {
- term.echo("This is an emulator, not a shell. Try following the instructions.");
- } else if (command === "colors") {
- for (DockerCommand in DockerCommands) {
- description = DockerCommands[DockerCommand];
- term.echo("[[b;#fff;]" + DockerCommand + "] - " + description + "");
- }
- } else if (command === "pull") {
- term.echo('[[b;#fff;]some text]');
- wait(term, 5000, true);
- alert(term.get_output());
- return;
- } else if (command) {
- term.echo("" + inputs[0] + ": command not found");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement