+ # find suiting commands
+ if command[0] in commands: # needed in case a complete command is a prefix of another one
+ cmdoptions = [command[0]]
+ else:
+ cmdoptions = complete_command(command[0])
+ # check how many we found
+ if len(cmdoptions) == 0: # no commands fit prefix
+ print("Command %s not found. Use help." % command[0])
+ elif len(cmdoptions) == 1: # exactly one command fits (prefix)