'pwd' is a internal command

This commit is contained in:
overflowerror 2014-05-21 13:17:54 +02:00
parent 1c3abce100
commit 001f0cea85
2 changed files with 4 additions and 7 deletions

View file

@ -1,7 +0,0 @@
var PwdClass = function() {
}
PwdClass.prototype = new Process();
PwdClass.prototype.main = function(args) {
this.files['stdout'].write(this.Environment.array['PWD'] + "\n");
this.exit(0);
}

View file

@ -89,6 +89,10 @@ WshClass.prototype.iCommands = {
args.splice(0,1); // we do not want to echo the "echo" args.splice(0,1); // we do not want to echo the "echo"
own.files["stdout"].write(args.join(" ")+"\n"); own.files["stdout"].write(args.join(" ")+"\n");
return 0; return 0;
},
"pwd": function(args, own) {
own.files['stdout'].write(this.Environment.global['PWD'] + "\n");
return 0;
} }
} }
WshClass.prototype.state = 0; WshClass.prototype.state = 0;