Skip to content

Format-Table with centered calculated property misaligns the column label #8428

@mklement0

Description

@mklement0

This is a regression from Windows PowerShell.

Steps to reproduce

[pscustomobject] @{ one = 1 } |
  Format-Table @{ l='one'; e='one'; width=10; alignment='center' }

Expected behavior


   one
   ---
    1


Actual behavior


one
   ---
    1

Note how the column header (one) is misaligned.

Environment data

PowerShell Core v6.2.0-preview.2 on macOS 10.14.1
PowerShell Core v6.2.0-preview.2 on Ubuntu 18.04.1 LTS
PowerShell Core v6.2.0-preview.2 on Microsoft Windows 10 Pro (64-bit; Version 1803, OS Build: 17134.407)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions