Skip to content

Format-Table -Wrap is broken #7179

@powercode

Description

@powercode

Steps to reproduce

[pscustomobject] @{Id=1;Name="This`nIs some random`nmultiline content"} | format-table -Wrap

Expected behavior

Id Name
-- ----
 1 This
   Is some random
   multiline content

Actual behavior

Id Name
-- ----
 1 This
 Is some random
 multiline content

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.1.0-preview.3
PSEdition                      Core
GitCommitId                    v6.1.0-preview.3
OS                             Microsoft Windows 10.0.16299
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Works OK in pwsh 6.0.2.

@SteveL-MSFT - I think this is a regression introduced by the trimming.

Metadata

Metadata

Assignees

Labels

Issue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions