Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Default Export-FormatData to pretty-printing or add an option #6681

Copy link
Copy link
@mklement0

Description

@mklement0
Issue body actions

Related: #6680

One use case for Export-FormatData - even though about_Format.ps1xml doesn't currently mention it - is to use existing formatting definitions as a starting point for creating new ones.

To that end, outputting pretty-printed XML would be much more convenient - currently, a single-line XML string is output.

  • If changing the existing behavior is not a backward-compatibility concern:

    • Simply output pretty-printed XML by default (it will consume more space, however)
  • Otherwise:

    • Introduce a switch such as -Format (or, to follow the - inverted - logic of ConvertTo-Json, perhaps -Uncompress?) that results in pretty-printed output.

Environment data

Written as of:

PowerShell Core v6.0.2
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Corecmdlets in the Microsoft.PowerShell.Core modulecmdlets in the Microsoft.PowerShell.Core module

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.