-
Notifications
You must be signed in to change notification settings - Fork 159
Description
Summary of the new feature / enhancement
When using New-MarkdownCommandHelp to generate a markdown template it includes a section for aliases where the user is expected to fill out the list of aliases. This seems like a poor default value because most commands will not have any aliases so most users will have to remove this section.
Even if we want to keep this section anyway, there's no real reason for users having to fill it out manually when this module could easily find the aliases for each command, either by running Get-Alias or by looking at the command metadata that is used as input to this command.
Proposed technical implementation details (optional)
Run this command in the session: Get-Alias -Definition Set-TimeZone or use the metadata: (Get-Command Set-TimeZone).ImplementingType.GetCustomAttributes([Alias], $true) or for functions: (Get-Command Test).ScriptBlock.Attributes | where TypeId -eq ([Alias])