Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Inline command aliases in help view#240

Merged
clangenb merged 5 commits into
mainfrom
inline-command-aliases-help-191
Feb 19, 2026
Merged

Inline command aliases in help view#240
clangenb merged 5 commits into
mainfrom
inline-command-aliases-help-191

Conversation

@eldara-cruncher
Copy link
Copy Markdown
Collaborator

@eldara-cruncher eldara-cruncher commented Feb 18, 2026

Summary

  • Aliases (e.g. ctx, context) no longer appear as separate rows in :help
  • They are grouped with their primary command and rendered as a three-column table:
    COMMAND          DESCRIPTION                          ALIASES
    :contexts        List and switch Docker contexts       ctx, context
    :help            Show all available commands
    :stacks          List stacks
    
  • Column widths computed dynamically from data; 3-space gap between columns
  • Header styled bold blue (lipgloss color 33, matching categorized help keys)
  • Adds Aliaser interface to registry so alias commands can self-identify

Test plan

  • go build ./...
  • go vet ./...
  • go test ./registry/ ./commands/command/ ./views/help/ — all pass
  • Verify :help output renders aligned table with blue header

Closes #191

🤖 Generated with Claude Code

@clangenb
Copy link
Copy Markdown
Collaborator

It works, but the layout does not look too nice.

image

I think it would be better if we can have a table with the headers: | Available Commands | Descriptions | aliases |, and the columns are nicely aligned to a meaningful width.

@clangenb
Copy link
Copy Markdown
Collaborator

Now it looks good:

image

@clangenb clangenb requested review from clangenb and mosonyi and removed request for mosonyi February 18, 2026 21:29
Copy link
Copy Markdown
Collaborator

@clangenb clangenb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @mosonyi please also have a look to see if you approve.

@mosonyi
Copy link
Copy Markdown
Collaborator

mosonyi commented Feb 19, 2026

I would add a space after the frame |

@clangenb
Copy link
Copy Markdown
Collaborator

I would add a space after the frame |

Good point, I will add it as a quick fix, but I have bigger goals in the future: #243

eldara-cruncher and others added 4 commits February 19, 2026 11:12
Aliases (e.g. ctx, context) no longer appear as separate rows in :help.
Instead they are grouped with their primary command and shown inline:

  :contexts        List and switch Docker contexts    aliases: context, ctx

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Replace inline "aliases: ..." suffix with a proper COMMAND / DESCRIPTION /
ALIASES table with dynamically computed column widths.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Use lipgloss bold+blue (color 33, matching categorized help keys)
for the COMMAND/DESCRIPTION/ALIASES header. Add 3-space gaps between
columns for readability.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@eldara-cruncher eldara-cruncher force-pushed the inline-command-aliases-help-191 branch from 29d4190 to 3d0b8a8 Compare February 19, 2026 11:14
@clangenb clangenb merged commit 81146cc into main Feb 19, 2026
11 checks passed
@eldara-cruncher eldara-cruncher deleted the inline-command-aliases-help-191 branch June 5, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[help] inline command alias instead of repeating entries

3 participants