Skip to content

Commit

Permalink
Integrate with powertab if it's available.
Browse files Browse the repository at this point in the history
  • Loading branch information
weeble authored and dahlbyk committed Aug 8, 2012
1 parent 36c35bc commit b35085d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions GitTabExpansion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,19 @@ function GitTabExpansion($lastBlock) {
}
}

if (Get-Command "Register-TabExpansion" -errorAction SilentlyContinue)
{
Register-TabExpansion "git.cmd" -Type Command {
param($Context, [ref]$TabExpansionHasOutput, [ref]$QuoteSpaces) # 1:

$line = $Context.Line
$lastBlock = [regex]::Split($line, '[|;]')[-1].TrimStart()
$TabExpansionHasOutput.Value = $true
GitTabExpansion $lastBlock
}
return
}

if (Test-Path Function:\TabExpansion) {
Rename-Item Function:\TabExpansion TabExpansionBackup
}
Expand Down

0 comments on commit b35085d

Please sign in to comment.