mirror of
https://github.com/sigmasternchen/webcli
synced 2025-03-15 06:08:54 +00:00
an echo program
This commit is contained in:
parent
dca3a9fd8c
commit
c628da5309
1 changed files with 13 additions and 0 deletions
13
data/scripts/programs/Echo.js
Normal file
13
data/scripts/programs/Echo.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
var Echo = function() {
|
||||
}
|
||||
Echo.prototype = new Program();
|
||||
Echo.prototype.main = function(args) {
|
||||
args.splice(0, 1);
|
||||
this.output(args.join(" ") + "\n");
|
||||
this.exit(0);
|
||||
}
|
||||
|
||||
ProgramManager.programs.push({
|
||||
command: "echo",
|
||||
code: Echo
|
||||
})
|
Loading…
Reference in a new issue