Help on info -menu command

Could anyone explain how the info command works when used with the menu style? Supposedly this command can be used to show additional information when a menu entry is highlighted, but if I source this script:

menu -select-cmds one nop info_one two nop info_two

define-command info_one %{
    info -style menu 'First option showing'

define-command info_two %{
    info -style menu 'Second option showing'

the menu with “one” and “two” does not show anything when highlighting either of the two entries. Calling info_one or info_two directly does show the corresponding info boxes, but I am unable to make them appear from the menu.

Somewhat confusingly, :info -style menu is not intended for use with the :menu command. Instead, it’s for use with custom completions. My Intro to Kakoune completions article includes an example completion that uses :info -style menu, if you’d like to see it in action.

1 Like