1

So we can use dialog --menu ... to make a menu. And we can quick select the option by first letter of the tag. I want dialog to register keystrokes and perform the autocomplete. E.g. we have 3 options:

  • Apply migrations
  • Create new branch
  • Exterminate

If I fill the textbox (a field which is supposed to be filled to perform the autocomplete) something like ter, then menu options shrink just to one option

  • Exterminate

So then I can just hit tab and select this option (or navigate using arrows if there are more options)

How? :)

1 Answer 1

1

dialog accepts the first character of labels (when in lists such as checkboxes) as a shortcut, and will cycle through matches if the character corresponds to multiple rows.

The feature is mentioned in documentation for the program and its library as abbreviation, e.g., (library):

dlg_button_to_char

Find the first uppercase character in the label, which we may use for an abbreviation. If the label is empty, return -1. If no uppercase character is found, return 0. Otherwise return the uppercase character.

Normally dlg_draw_buttons and dlg_char_to_button use the first uppercase character. However, they keep track of all of the labels and if the first has already been used in another label, they will continue looking for another uppercase character. This function does not have enough information to make that check.

It does not do autocompletion (doing that would require an additional window).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .