Skip to content

Populate ALIASES documentation section based on actual command aliases #221

@MariusStorhaug

Description

Context

The Document-PSModule action generates documentation for PowerShell commands, including an ALIASES section. Currently, this section contains a placeholder template: This cmdlet has the following aliases, {{Insert list of aliases}}.

Request

The ALIASES section in generated documentation should be populated dynamically based on whether the command actually has aliases defined.

What is expected

  • If the command has aliases, the section should list them:
    ## ALIASES
    
    This cmdlet has the following aliases:
    - New-CommandAlias
    - Some-OtherAlias
  • If the command has no aliases, the section should state so:
    ## ALIASES
    
    There are no aliases for this command.

Acceptance criteria

  • The ALIASES section is populated correctly based on actual alias data
  • Commands with aliases show a bullet list of alias names
  • Commands without aliases display "There are no aliases for this command."
  • No placeholder template text remains in generated documentation

Technical decisions

To be determined during implementation planning — identify where alias data is available during documentation generation.


Implementation plan

  • Identify where the ALIASES section is generated in Document-PSModule
  • Query alias data for each command during documentation generation
  • Render the alias list or "no aliases" message based on the query result
  • Test with commands that have aliases and commands that do not

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions