Skip to content

feat(list_menu): add DescriptionPosition to control description place…#1044

Open
a-rookie-of-C-language wants to merge 2 commits intonushell:mainfrom
a-rookie-of-C-language:feat/list-menu-description-position
Open

feat(list_menu): add DescriptionPosition to control description place…#1044
a-rookie-of-C-language wants to merge 2 commits intonushell:mainfrom
a-rookie-of-C-language:feat/list-menu-description-position

Conversation

@a-rookie-of-C-language
Copy link
Copy Markdown

Add a DescriptionPosition enum that lets callers choose whether the
completion description is rendered before or after the value in a
ListMenu row.

Previously the position was hardcoded as (description) value.
The new default keeps that behaviour (Before) for backwards
compatibility; setting After renders value description instead,
which is more natural for flag/option completions where the value
(e.g. --regexp) should visually come first.

Changes:

  • DescriptionPosition enum with Before (default) and After variants
  • ListMenu::description_position field (default: Before)
  • ListMenu::with_description_position() builder method
  • create_string() branches on self.description_position
  • Re-export DescriptionPosition from menu/mod.rs and lib.rs

This mirrors the existing IdeMenu::with_description_mode() pattern.

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.

1 participant