define(['require', 'exports', './env', './events', './command', './runContext'], function(require, exports, env, events, command, runContext) {
	var Enviorment = env.Enviorment;
	var RunContext = runContext.RunContext;
	var EventEmitter = events.EventEmitter;
	var CommandRunner = command.CommandRunner;
	
	var inherits = function(ctor, superCtor) {
	  ctor.super_ = superCtor;
	  ctor.prototype = Object.create(superCtor.prototype, {
		constructor: {
		  value: ctor,
		  enumerable: false,
		  writable: true,
		  configurable: true
		}
	  });
	};
	
	exports.Terminal = (function() {
		function Terminal(os, view) {
			var self = this;
			
			this.env = new Enviorment(os.env);
			this.fs = os.fs;
			this.commandRunner = new CommandRunner(this);
			this.currentDir = this.fs.currentDir;
			this.view = view;
			
			EventEmitter.call(this);
			
			this.commandRunner.on('command:run', function(pipes) {
				self.emit('command:run', pipes);
			});
		}
		
		inherits(Terminal, EventEmitter);
		
		Terminal.prototype.runCMD = function runCMD(cmd) {
			return this.commandRunner.run(cmd, this.currentDir);
		};
		
		Terminal.prototype.findCMD = function findCMD(cmdName, curDir) {
			var pathSplit, cmdSplit, i;
			
			pathSplit = this.env.vars.PATH.split(':');
			cmdSplit = cmdName.split('/');
			
			for(i = 0; i < pathSplit.length; i++) {
				if(this.fs.hasFile(this.fs.getFile(cmdSplit.slice(0, cmdSplit.length - 1).join('/'), this.fs.getFile(pathSplit[i])), cmdSplit[cmdSplit.length - 1])) {
					if(this.fs.isExec(tmpFile = this.fs.getFile(cmdName, this.fs.getFile(pathSplit[i])))) {
						return tmpFile;
					}
				}
			}
			
			if(this.fs.hasFile(this.fs.getFile(cmdSplit.slice(0, cmdSplit.length - 1).join('/'), this.currentDir), cmdSplit[cmdSplit.length - 1])) {
				if(this.fs.isExec(tmpFile = this.fs.getFile(cmdName, this.currentDir))) {
					return tmpFile;
				}
			}
			
			if(this.fs.hasFile(this.fs.getFile(cmdSplit.slice(0, cmdSplit.length - 1).join('/'), curDir), cmdSplit[cmdSplit.length - 1])) {
				if(this.fs.isExec(tmpFile = this.fs.getFile(cmdName, curDir))) {
					return tmpFile;
				}
			}
			
			return undefined;
		};
		
		Terminal.prototype.createRunContext = function createRunContext(cmdLine) {
			return new RunContext(this.view, cmdLine);
		};
		
		return Terminal;
	})();
});

@@ -2218,16 +2218,27 @@
 (cmdLine
+, invisible
 ) %7B%0A%09%09%09r
@@ -2262,21 +2262,16 @@
 ext(this
-.view
 , cmdLin
@@ -2271,16 +2271,27 @@
  cmdLine
+, invisible
 );%0A%09%09%7D;%0A

Add some other invisible stuff (pass invisible around in the terminal)