highline icon indicating copy to clipboard operation
highline copied to clipboard

Allow menu lines to be customized beyond the index

Open dantman opened this issue 10 years ago • 2 comments

HighLine::Menu feels relatively restricted. Besides the index, the output of each line can only contain the item.

This means that where you have simple items and more descriptive textual forms you end up stuck only outputting the cryptic short item leaving you with a not so intuitive user interface.

For example take a list of countries. With (item, text) pairs like (:us, "United States"), (:ca, "Canada"), ... the interface is stuck looking like this:

1. us
2. ca
Country: us

Since we have textual forms a much more intuitive way to output this menu would be:

1. us - United States
2. ca - Canada
Country: us

However this is currently impossible without reimplementing the layout in a really mess and hacky way. Menu has help text however all this does when used is add an additional help item which isn't very useful or intuitive for this.

dantman avatar Nov 01 '13 03:11 dantman