Skip to content

Display command description in doc dialog on tab completion#1180

Merged
tompng merged 4 commits intomasterfrom
display-command-help
Mar 13, 2026
Merged

Display command description in doc dialog on tab completion#1180
tompng merged 4 commits intomasterfrom
display-command-help

Conversation

@st0012
Copy link
Member

@st0012 st0012 commented Mar 9, 2026

Summary

Proposed by @elct9620

Screen.Recording.2026-03-09.at.13.04.21.mov
  • Refactor show_doc_dialog_proc into smaller focused methods (rdoc_dialog_contents, easter_egg_dialog_contents, command_doc_dialog_contents, dialog_doc_position)
  • Introduce DocumentTarget class hierarchy (CommandDocument, MethodDocument) to replace stringly-typed doc namespace returns for commands
  • Display command description and help message in the autocomplete doc dialog popup when a command is selected
  • Consolidate full-screen doc display into display_document, eliminating duplication between dialog Alt+d paths and perfect-match display
  • Move command dialog content rendering to Command::Base.doc_dialog_content so commands own their presentation

st0012 added 3 commits March 9, 2026 11:55
The open_doc paths in dialog content methods duplicated logic already
in display_document. Now the dialog lambda calls display_document
directly for Alt+d, and the content methods only handle inline dialog
rendering.
@st0012 st0012 added the enhancement New feature or request label Mar 9, 2026
@st0012 st0012 marked this pull request as ready for review March 9, 2026 13:05
Split on /(\s+)/ instead of /\s+/ so multi-space gaps in help text
(e.g. option alignment) are preserved when wrapping lines.
@tompng tompng merged commit 6b6874b into master Mar 13, 2026
80 checks passed
@tompng tompng deleted the display-command-help branch March 13, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants