Permalink
Browse files

Show modified files before branches when expanding git checkout -- <tab>

  • Loading branch information...
1 parent c4ac7bf commit fec4e2138d9d2c3753fafd2d4e99ddbfee9ea24b @dahlbyk committed May 18, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 GitTabExpansion.ps1
View
@@ -176,11 +176,6 @@ function GitTabExpansion($lastBlock) {
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>
"^commit.*-C\s+(?<ref>\S*)$" {
gitBranches $matches['ref'] $true
@@ -200,6 +195,11 @@ function GitTabExpansion($lastBlock) {
"^rm.* (?<index>\S*)$" {
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
+ }
}
}

0 comments on commit fec4e21

Please sign in to comment.