plugins/ezout/formats/MatchInfo.format.ps1xml

<?xml version="1.0" encoding="utf-16"?>
<Configuration>
  <ViewDefinitions>
    <View>
      <Name>Microsoft.Powershell.Commands.MatchInfo</Name>
      <ViewSelectedBy>
        <TypeName>Microsoft.Powershell.Commands.MatchInfo</TypeName>
      </ViewSelectedBy>
      <TableControl>
        <AutoSize />
        <TableHeaders>
          <TableColumnHeader>
            <Label>Path</Label>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>LineNumber</Label>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Line</Label>
          </TableColumnHeader>
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <TableColumnItems>
              <TableColumnItem>
                <ScriptBlock>
            if ($OMPPansiesModuleLoaded -and ($null -ne (get-variable OMPEZOutDefinitions)) -and $OMPConsoleHasANSI -and $Global:OMPEzOutPluginLoaded) {
                $revertcolor = New-Text -Object "" -ForegroundColor ((Get-OMPHostState).foreground) -ErrorAction:SilentlyContinue

                $PathOut = New-Text -Object ($_.RelativePath($pwd)) -Foregroundcolor $Global:OMPEZOutDefinitions['Match'].Path['Color']

                # Pansies likes to reset the default color to white for some reason, this resets the color correctly.
                [string]$finaloutput = $PathOut.ToString() + $revertcolor.ToString()
                $finaloutput
            }
            else {
                $_.RelativePath($pwd)
            }
        </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>
            if ($OMPPansiesModuleLoaded -and ($null -ne (get-variable OMPEZOutDefinitions)) -and $OMPConsoleHasANSI -and $Global:OMPEzOutPluginLoaded) {
                $revertcolor = New-Text -Object "" -ForegroundColor ((Get-OMPHostState).foreground) -ErrorAction:SilentlyContinue
                $LineNumberOut = New-Text -Object ($_.LineNumber) -Foregroundcolor $Global:OMPEZOutDefinitions['Match'].LineNumber['Color']

                # Pansies likes to reset the default color to white for some reason, this resets the color correctly.
                [string]$finaloutput = $LineNumberOut.ToString() + $revertcolor.ToString()
                $finaloutput
            }
            else {
                $_.LineNumber
            }
        </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>
            if ($OMPPansiesModuleLoaded -and ($null -ne (get-variable OMPEZOutDefinitions)) -and $OMPConsoleHasANSI -and $Global:OMPEzOutPluginLoaded ) {
                $revertcolor = New-Text -Object "" -ForegroundColor ((Get-OMPHostState).foreground) -ErrorAction:SilentlyContinue
                $startofright = $_.Matches.Index + $_.Matches.Value.Length
                $endofright = ($_.line.length - $startofright)
                $leftoutput = New-Text -Object ($_.Line).Substring(0,($_.Matches).Index) -Foregroundcolor $Global:OMPEZOutDefinitions['Match'].Line['Color']
                $matchoutput = New-Text -Object ($_.Matches).Value -Foregroundcolor $Global:OMPEZOutDefinitions['Match'].Match['Color']
                $rightoutput = New-Text -Object ($_.Line).Substring($startofright, $endofright) -Foregroundcolor $Global:OMPEZOutDefinitions['Match'].Line['Color']
                # Pansies likes to reset the default color to white for some reason, this resets the color correctly.
                [string]$finaloutput = $leftoutput.ToString() + $matchoutput.ToString() + $rightoutput.ToString() + $revertcolor.ToString()

                $finaloutput
            }
            else {
                $_.Line
            }
        </ScriptBlock>
              </TableColumnItem>
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>
  </ViewDefinitions>
</Configuration>