add a vcs level to the shortcut map

This commit is contained in:
Siddharth Agarwal 2013-07-30 23:50:23 -07:00
parent f14c128174
commit 3c1887f1d0
6 changed files with 34 additions and 38 deletions

View file

@ -74,11 +74,13 @@ ParseWaterfall.prototype.expandAllShortcuts = function(commandStr) {
};
ParseWaterfall.prototype.expandShortcut = function(commandStr, shortcutMap) {
_.each(shortcutMap, function(regex, method) {
var results = regex.exec(commandStr);
if (results) {
commandStr = method + ' ' + commandStr.slice(results[0].length);
}
_.each(shortcutMap, function(map, vcs) {
_.each(map, function(regex, method) {
var results = regex.exec(commandStr);
if (results) {
commandStr = vcs + ' ' + method + ' ' + commandStr.slice(results[0].length);
}
});
});
return commandStr;
};