Skip to content

Don't create the aliases section by default #805

@MartinGC94

Description

@MartinGC94

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])

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-InvestigationThe behavior reported in the issue is unexpected and needs further investigation.Needs-TriageThe issue is new and needs to be triaged by a work group.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions