mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 16:08:34 +02:00
Allow for multiple spaces in git commands Issue #44
This commit is contained in:
parent
c5a3f866ab
commit
a2e89f592d
8 changed files with 56 additions and 54 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue