Initial support for auto completion

Support passing an object as the interpreter. At the moment, that
object is not used to execute the command, but its keys are used
as the list of commands to check for auto completion through TAB
key.