mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-19 10:14:59 +02:00
add a vcs level to the shortcut map
This commit is contained in:
parent
f14c128174
commit
3c1887f1d0
6 changed files with 34 additions and 38 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue