Few cleanups in the command line parsing code
Extract shell_complete lambda as a proper function
Support completing %opt{...} and %sh{...} in command manager
NCursesUI: no item is selected on menu_show