I use completedefault( see document ) to complete using the module Cmd. But it seems that this is called only after the first word.
def completedefault(self,text,line,begidx,endidx):
print('completedefault is called')
return ['foo','bar']
Output:
(Cmd) f<Tab><Tab>
(Cmd) foo f<Tab><Tab>
completedefault is called
foo bar
How to change this behavior so that it is called even at the first word?
source
share