mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
able to open up views now from comand line
This commit is contained in:
parent
4aeb56c840
commit
764fbf63bc
9 changed files with 813 additions and 643 deletions
|
@ -39,4 +39,27 @@ var instantCommands = [
|
|||
}]
|
||||
];
|
||||
|
||||
var regexMap = {
|
||||
'help': /^help($|\s)|\?/
|
||||
};
|
||||
|
||||
var parse = function(str) {
|
||||
var sandboxMethod;
|
||||
|
||||
_.each(regexMap, function(regex, method) {
|
||||
if (regex.test(str)) {
|
||||
sandboxMethod = method;
|
||||
}
|
||||
});
|
||||
|
||||
return (!sandboxMethod) ? false : {
|
||||
toSet: {
|
||||
eventName: 'processSandboxCommand',
|
||||
method: sandboxMethod
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
exports.instantCommands = instantCommands;
|
||||
exports.parse = parse;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue