Title: Default Export-FormatData to pretty-printing or add an option · Issue #6681 · PowerShell/PowerShell · GitHub
Open Graph Title: Default Export-FormatData to pretty-printing or add an option · Issue #6681 · PowerShell/PowerShell
X Title: Default Export-FormatData to pretty-printing or add an option · Issue #6681 · PowerShell/PowerShell
Description: 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-printe...
Open Graph Description: 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 one...
X Description: 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...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/6681
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Default Export-FormatData to pretty-printing or add an option","articleBody":"\u003csup\u003eRelated: #6680\u003c/sup\u003e\r\n\r\nOne use case for `Export-FormatData` - even though [`about_Format.ps1xml` doesn't currently mention it](https://github.com/PowerShell/PowerShell-Docs/issues/2341) - is to use existing formatting definitions as a starting point for creating new ones.\r\n\r\nTo that end, outputting _pretty-printed_ XML would be much more convenient - currently, a single-line XML string is output.\r\n\r\n* If changing the existing behavior is not a backward-compatibility concern:\r\n\r\n * Simply output pretty-printed XML by default (it will consume more space, however)\r\n\r\n* Otherwise:\r\n \r\n * Introduce a switch such as `-Format` (or, to follow the - inverted - logic of `ConvertTo-Json`, perhaps `-Uncompress`?) that results in pretty-printed output.\r\n\r\n\r\nEnvironment data\r\n----------------\r\n\r\nWritten as of:\r\n\r\n```powershell\r\nPowerShell Core v6.0.2\r\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2018-04-19T16:17:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/6681/PowerShell/issues/6681"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8d9e12e4-9f9f-4531-fd20-28e8dd779f94 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D972:25F50E:7C657A:A5E718:6A55603C |
| html-safe-nonce | c626b358023404ee43fbf15e339413f6129d54c5ec723f4ceadd81a1730bd20e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTcyOjI1RjUwRTo3QzY1N0E6QTVFNzE4OjZBNTU2MDNDIiwidmlzaXRvcl9pZCI6Ijc1OTU2MDU3ODczNzQwODQxNTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8ebc081b50bcb32a42222b038bd3ef64812a4a61d0a4e67ad1a2a56f6220bc39 |
| hovercard-subject-tag | issue:315947693 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/6681/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7be2800b10018cb4aa728918431a1452f0fded98ee6ecbaf9a7e2c0a474ca729/PowerShell/PowerShell/issues/6681 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7be2800b10018cb4aa728918431a1452f0fded98ee6ecbaf9a7e2c0a474ca729/PowerShell/PowerShell/issues/6681 |
| og:image:alt | 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 one... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mklement0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8201d0b7bc32164c4662de52242e463a356df543 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width