TerminalBlocks.format.ps1xml
<Configuration>
<ViewDefinitions> <View> <Name>TerminalBlock</Name> <ViewSelectedBy> <TypeName>PoshCode.TerminalBlock</TypeName> </ViewSelectedBy> <TableControl> <TableHeaders> <TableColumnHeader> <Width>10</Width> <Label>Background</Label> </TableColumnHeader> <TableColumnHeader> <Width>10</Width> <Label>Foreground</Label> </TableColumnHeader> <TableColumnHeader> <Label>Content</Label> </TableColumnHeader> <TableColumnHeader> <Label>ToString</Label> </TableColumnHeader> </TableHeaders> <TableRowEntries> <TableRowEntry> <TableColumnItems> <TableColumnItem> <ScriptBlock> $_.BackgroundColor.ToVtEscapeSequence($true) + " $([char]27)[0m " + $_.BackgroundColor.ToString() </ScriptBlock> </TableColumnItem> <TableColumnItem> <ScriptBlock> $_.ForegroundColor.ToVtEscapeSequence($true) + " $([char]27)[0m " + $_.ForegroundColor.ToString() </ScriptBlock> </TableColumnItem> <TableColumnItem> <ScriptBlock> if ($_.Content -is [ScriptBlock]) { $_.ToPSScript() + "$([char]27)[0m" } else { [System.Management.Automation.LanguagePrimitives]::ConvertTo($_.Content, [string]).Trim() + "$([char]27)[0m" } </ScriptBlock> </TableColumnItem> <TableColumnItem> <ScriptBlock> $_.ToString() + "$([char]27)[0m" </ScriptBlock> </TableColumnItem> </TableColumnItems> </TableRowEntry> </TableRowEntries> </TableControl> </View> </ViewDefinitions> </Configuration> |