Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Commit

Permalink
Refactored to allow both powertab's and the visual studio nuget conso…
Browse files Browse the repository at this point in the history
…le's version of Register-TabExpansion to work, as used in posh-git
  • Loading branch information
eugeneduvenage committed Jul 6, 2013
1 parent 460e414 commit a362917
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions HgTabExpansion.ps1
Expand Up @@ -298,9 +298,10 @@ function populatehgflowStreams($filename) {
$script:hgflowStreams = if ($ini["Basic"]) { $ini["Basic"] } else { $ini["branchname"] }
}

if (Get-Command "Register-TabExpansion" -errorAction SilentlyContinue)
$PowerTab_RegisterTabExpansion = Get-Command Register-TabExpansion -Module powertab -ErrorAction SilentlyContinue
if ($PowerTab_RegisterTabExpansion)
{
Register-TabExpansion "hg.exe" -Type Command {
& $PowerTab_RegisterTabExpansion "hg.exe" -Type Command {
param($Context, [ref]$TabExpansionHasOutput, [ref]$QuoteSpaces) # 1:

$line = $Context.Line
Expand Down

0 comments on commit a362917

Please sign in to comment.