From 042ab42ee9259a8bf3cc6ef69b92afeca1dbe3be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramo=CC=81n=20Lamana?= Date: Thu, 25 Apr 2013 11:33:17 +0200 Subject: [PATCH] Adds demo terminal commands --- .../desktop/terminal/commands/testcommands.js | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/examples/desktop/terminal/commands/testcommands.js b/examples/desktop/terminal/commands/testcommands.js index 39077e5..324262d 100644 --- a/examples/desktop/terminal/commands/testcommands.js +++ b/examples/desktop/terminal/commands/testcommands.js @@ -7,12 +7,31 @@ 'use strict'; var TestCommands = { - block: function() { - setTimeout.call(this, function(){ - this.write('Process has finished'); - this.exit(); - }, 3000); + ls: function() { + // Fake 'ls' command for demo purposes + this.write('LICENSE\nMakefile\nREADME.md\nbuild/\nbuild.js\nexamples/\nsrc/\nvendor/\n'); + this.exit(); + }, + + ll: function() { + TestCommands.ls.call(this, arguments); + }, + help: function() { + this.write('Press < tab > to see a list of available commands.'); + this.exit(); + }, + + pwd: function() { + // Fake 'pwd' command for demo purposes + this.write('github.com:rlamana/Ventus'); + this.exit(); + }, + + cd: function() { + // Fake 'cd' command for demo purposes + this.write('Sorry, access not granted'); + this.exit(); }, exit: function() {