-
Notifications
You must be signed in to change notification settings - Fork 1.7k
.ps1xml formatting file doc corrections
#12614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.ps1xml formatting file doc corrections
#12614
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
.ps1xml formatting file doc corrections
reference/5.1/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md
Outdated
Show resolved
Hide resolved
reference/7.4/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md
Outdated
Show resolved
Hide resolved
reference/7.5/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md
Outdated
Show resolved
Hide resolved
reference/7.6/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md
Outdated
Show resolved
Hide resolved
This fixes the wrong path used in both `Update-FormatData` examples. The paths used to initially create the custom formatting files are .\MyDotNetTypes.Format.ps1xml and .\MyFileSystem.Format.ps1xml. Before this change, Update-FormatData -PrependPath incorrectly pointed to $HOME\Format\CultureInfo.Format.ps1xml and $PSHOME\Format\MyFileSystem.Format.ps1xml.
Both Update-FormatData examples now use the $HOME\Format example path. This also updates the first example to create the directory before calling Export-FormatData, as the directory doesn't exist by default and Export-FormatData fails if part of the path is missing.
This fixes the incorrect assertion that formatting files **must** use `.format.ps1xml` (only `.ps1xml` is required).
The original note suggests that after copying Win PS formatting files, the signature block should be replaced. However, the files don't actually contain a signature block to begin with. This may cause confusion, so the note is updated with a more generalized suggestion on signing taken from about_Format.ps1xml. Also includes minor style changes and less Windows-specific references.
The 7.x docs use `$HOME\Format` as an example directory. This updates the 5.1 doc to use the same path. It also removes the suggestion to place custom formatting files in Win PS's `$PSHOME`. As this is a system directory, it's not an appropriate location for user files.
0f2da98 to
5d421c4
Compare
This comment was marked as outdated.
This comment was marked as outdated.
1 similar comment
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
This comment was marked as outdated.
This comment was marked as outdated.
|
Learn Build status updates of commit 5d421c4: ✅ Validation status: passed
For more details, please refer to the build report. |
PR Summary
This PR fixes various
.ps1xmlformatting file doc issues.about_Format.ps1xmlexamples.Copy-Item/Export-FormatDatadoesn't create missing directories)..format.ps1xml(only.ps1xmlis required).PR Checklist