ls.js (445B)
1 2 window.FakeTerminal.command.ls = function (instance) { 3 window.FakeTerminal.command.apply(this, arguments); 4 5 const base = this; 6 7 base.info = () => { 8 return { 9 description: "List the files in the current working directory" 10 } 11 } 12 13 base.execute = () => { 14 instance.output.write("This is a test"); 15 16 base.deferred.resolve(); 17 return base.deferred.promise(); 18 } 19 20 return base; 21 }