diff --git a/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs b/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs index 09cc323b9..7dd691456 100644 --- a/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs +++ b/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs @@ -46,6 +46,10 @@ namespace System.Management.Automation.Runspaces "Microsoft.PowerShell.Commands.MatchInfo", ViewsOf_Microsoft_PowerShell_Commands_MatchInfo()); + yield return new ExtendedTypeDefinition( + "Deserialized.Microsoft.PowerShell.Commands.MatchInfo", + ViewsOf_Deserialized_Microsoft_PowerShell_Commands_MatchInfo()); + yield return new ExtendedTypeDefinition( "System.Management.Automation.PSVariable", ViewsOf_System_Management_Automation_PSVariable()); @@ -382,6 +386,16 @@ namespace System.Management.Automation.Runspaces .EndControl()); } + private static IEnumerable ViewsOf_Deserialized_Microsoft_PowerShell_Commands_MatchInfo() + { + yield return new FormatViewDefinition("MatchInfo", + CustomControl.Create() + .StartEntry() + .AddScriptBlockExpressionBinding(@"$_.Line") + .EndEntry() + .EndControl()); + } + private static IEnumerable ViewsOf_System_Management_Automation_PSVariable() { yield return new FormatViewDefinition("Variable",