PowerShell / PowerShell/platyPS

Don't create the aliases section by default

Open
#805 1 comment 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs-Investigation Needs-Triage
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.