summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-05-16 17:39:14 +0200
committermathieui <mathieui@mathieui.net>2012-05-16 17:39:14 +0200
commit155914470da7f63d7a41025a17c1fd0827ed7df9 (patch)
tree5fadb448bb77ee41c15d049825db55be2157a8ae /src
parent1e07cd4f58a2c0c9bc29bb9f5d2e62d4b2366f74 (diff)
downloadpoezio-155914470da7f63d7a41025a17c1fd0827ed7df9.tar.gz
poezio-155914470da7f63d7a41025a17c1fd0827ed7df9.tar.bz2
poezio-155914470da7f63d7a41025a17c1fd0827ed7df9.tar.xz
poezio-155914470da7f63d7a41025a17c1fd0827ed7df9.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 1ac301a1..a66d81cd 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -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