Complete the commands differently.

If there is 0 match for the beginning of command, delete the last
letter (over and over) until there is a match, then complete that.
This commit is contained in:
mathieui 2012-05-16 17:39:14 +02:00
parent 1e07cd4f58
commit 155914470d

View file

@ -217,6 +217,10 @@ class Tab(object):
# Otherwise we would need to add a useless space before being
# able to complete the arguments.
hit_copy = set(the_input.hit_list)
while not hit_copy:
the_input.key_backspace()
the_input.auto_completion(words, '', quotify=False)
hit_copy = set(the_input.hit_list)
if len(hit_copy) == 1:
the_input.do_command(' ')
return True