PowerShell / PowerShell/platyPS
Don't create the aliases section by default
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 871
- Forks
- 166
- Avg merge
- 21h 17m
- Merged PRs (30d)
- 1
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])
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the New-MarkdownCommandHelp implementation and trace how it builds the aliases section for a command. Compare the proposed Get-Alias and command metadata approaches, then verify that commands without aliases do not receive an empty section and that existing aliases are handled as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100