support for tab completion and auto-selection of first element in list on tab or enter