Skip to content

feat: support hiding selected command aliases from help#2361

Open
pixel365 wants to merge 1 commit intospf13:mainfrom
pixel365:hidden-aliases
Open

feat: support hiding selected command aliases from help#2361
pixel365 wants to merge 1 commit intospf13:mainfrom
pixel365:hidden-aliases

Conversation

@pixel365
Copy link
Copy Markdown

Summary

Support hiding selected command aliases from help output.

Motivation

Some commands may retain deprecated or compatibility aliases
that should remain functional but not be displayed in help
and usage text.

Currently, aliases are always shown if defined, which makes it
impossible to keep backward-compatible aliases without exposing
them in help output.

Changes

  • Add MarkAliasesHidden to allow marking specific aliases as hidden.
  • Add HasVisibleAliases to determine whether aliases should be rendered.
  • Update NameAndAliases and usage rendering to exclude hidden aliases.
  • Keep command execution and completion behavior unchanged.
  • Add tests for alias hiding and help rendering.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 25, 2026

CLA assistant check
All committers have signed the CLA.

Introduce MarkAliasesHidden and HasVisibleAliases to allow commands
to retain deprecated or compatibility aliases without displaying
them in help and usage output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants