refactor(console) getOnMessage

This commit is contained in:
coderaiser 2014-05-21 04:16:37 -04:00
parent a2604fdc91
commit ebc7159c37

View file

@ -108,11 +108,14 @@
* @param callback
*/
function getOnMessage(connNum, callback, command) {
var winCommand, symbolsExec, funcExec, firstChar,
var winCommand, funcExec, firstChar,
connName, ret, isContain,
dir, options = {};
dir = ClientDirs[connNum];
symbolsExec = ['*', '&', '{', '}', '|', '\'', '"'],
dir = ClientDirs[connNum],
options = {
cwd: dir || DIR
};
if (!dir)
dir = ClientDirs[connNum] = DIR;
@ -157,10 +160,8 @@
});
funcExec = ClientFuncs[connNum];
symbolsExec = ['*', '&', '{', '}', '|', '\'', '"'];
isContain = Util.isContainStr(command, symbolsExec);
firstChar = command[0];
options.cwd = dir;
if (firstChar === '#') {
command = command.slice(1);