-
Notifications
You must be signed in to change notification settings - Fork 159
Open
Labels
Area-MAMLIssue concerns conversion to MAMLIssue concerns conversion to MAML
Milestone
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Steps to reproduce
function Test-Alias {
param(
[Parameter()]
[Alias("a")] $Alias
)
}
$cmdHelp = New-CommandHelp -CommandInfo (Get-Command Test-Alias)
$cmdHelp.Parameters.Aliases
$file = Export-MamlCommandHelp -CommandHelp $cmdHelp -OutputFolder /tmp -Encoding utf8NoBOM
Get-Content $file | ? { $_ -match "aliases" }Parameter aliases are not reflected in the Maml help generated by Export-MamlCommandHelp, even though $cmdHelp.Parameters.Aliaes is correctly set to a.
Expected behavior
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="a">
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="a">The important part is the aliases attribute in <command:parameters>.
The aliases attribute in <command:syntaxItem> may be left at none.
Actual behavior
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none">
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none">Error details
Environment data
PS> $PSVersionTable
Name Value
---- -----
PSVersion 7.5.2
PSEdition Core
GitCommitId 7.5.2
OS Ubuntu 24.04.3 LTS
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Version
1.0.1
Visuals
No response
Metadata
Metadata
Assignees
Labels
Area-MAMLIssue concerns conversion to MAMLIssue concerns conversion to MAML