Skip to content

Commit

Permalink
Add initializer in gitBranches so that completion works in strict mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebakken authored and dahlbyk committed Aug 8, 2012
1 parent aa391e6 commit 377d817
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion GitTabExpansion.ps1
@@ -1,7 +1,7 @@
# Initial implementation by Jeremy Skinner # Initial implementation by Jeremy Skinner
# http://www.jeremyskinner.co.uk/2010/03/07/using-git-with-windows-powershell/ # http://www.jeremyskinner.co.uk/2010/03/07/using-git-with-windows-powershell/


$global:GitTabSettings = New-Object PSObject -Property @{ $Global:GitTabSettings = New-Object PSObject -Property @{
AllCommands = $false AllCommands = $false
} }


Expand Down Expand Up @@ -46,6 +46,7 @@ function script:gitRemotes($filter) {
} }


function script:gitBranches($filter, $includeHEAD = $false) { function script:gitBranches($filter, $includeHEAD = $false) {
$prefix = $null
if ($filter -match "^(?<from>\S*\.{2,3})(?<to>.*)") { if ($filter -match "^(?<from>\S*\.{2,3})(?<to>.*)") {
$prefix = $matches['from'] $prefix = $matches['from']
$filter = $matches['to'] $filter = $matches['to']
Expand Down

0 comments on commit 377d817

Please sign in to comment.