Got autocompletion to 'complete' complete terms as well, thus indicating their validity. Also, handled empty input line so that hitting tab without having entered anything shows available commands.