Allow for multiple spaces in git commands Issue #44

This commit is contained in:
Peter Cottle 2013-02-20 19:36:17 -08:00
parent c5a3f866ab
commit a2e89f592d
8 changed files with 56 additions and 54 deletions

View file

@ -49,18 +49,18 @@ var instantCommands = [
var regexMap = {
// ($|\s) means that we either have to end the string
// after the command or there needs to be a space for options
'git commit': /^git commit($|\s)/,
'git add': /^git add($|\s)/,
'git checkout': /^git checkout($|\s)/,
'git rebase': /^git rebase($|\s)/,
'git reset': /^git reset($|\s)/,
'git branch': /^git branch($|\s)/,
'git revert': /^git revert($|\s)/,
'git log': /^git log($|\s)/,
'git merge': /^git merge($|\s)/,
'git show': /^git show($|\s)/,
'git status': /^git status($|\s)/,
'git cherry-pick': /^git cherry-pick($|\s)/
'git commit': /^git +commit($|\s)/,
'git add': /^git +add($|\s)/,
'git checkout': /^git +checkout($|\s)/,
'git rebase': /^git +rebase($|\s)/,
'git reset': /^git +reset($|\s)/,
'git branch': /^git +branch($|\s)/,
'git revert': /^git +revert($|\s)/,
'git log': /^git +log($|\s)/,
'git merge': /^git +merge($|\s)/,
'git show': /^git +show($|\s)/,
'git status': /^git +status($|\s)/,
'git cherry-pick': /^git +cherry-pick($|\s)/
};
var parse = function(str) {