Skip to content

Commit

Permalink
Show modified files before branches when expanding git checkout -- <tab>
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlbyk committed May 18, 2012
1 parent c4ac7bf commit fec4e21
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions GitTabExpansion.ps1
Expand Up @@ -176,11 +176,6 @@ function GitTabExpansion($lastBlock) {
gitIndex $matches['path'] gitIndex $matches['path']
} }


# Handles git <cmd> <ref>
"^(?:checkout|cherry-pick|diff|difftool|log|merge|rebase|reflog\s+show|reset|revert|show).* (?<ref>\S*)$" {
gitBranches $matches['ref'] $true
}

# Handles git <cmd> <ref> # Handles git <cmd> <ref>
"^commit.*-C\s+(?<ref>\S*)$" { "^commit.*-C\s+(?<ref>\S*)$" {
gitBranches $matches['ref'] $true gitBranches $matches['ref'] $true
Expand All @@ -200,6 +195,11 @@ function GitTabExpansion($lastBlock) {
"^rm.* (?<index>\S*)$" { "^rm.* (?<index>\S*)$" {
gitDeleted $matches['index'] gitDeleted $matches['index']
} }

# Handles git <cmd> <ref>
"^(?:checkout|cherry-pick|diff|difftool|log|merge|rebase|reflog\s+show|reset|revert|show).* (?<ref>\S*)$" {
gitBranches $matches['ref'] $true
}
} }
} }


Expand Down

0 comments on commit fec4e21

Please sign in to comment.