more bug fixing

This commit is contained in:
Dominik Moritz Roth 2020-07-18 00:25:37 +02:00
parent 5dae6eaebc
commit ee80fa42d3

4
Rex.py
View File

@ -154,14 +154,14 @@ class Rex():
with patch_stdout(): with patch_stdout():
try: try:
inp = await self.session.prompt_async(self.prompt, inp = await self.session.prompt_async(self.prompt,
completer = _CompletionLookup(), completer = _CompletionLookup(self.cmds),
auto_suggest = AutoSuggestFromHistory(), auto_suggest = AutoSuggestFromHistory(),
bottom_toolbar = [None,self._bottom_toolbar][self.hasToolbar]) bottom_toolbar = [None,self._bottom_toolbar][self.hasToolbar])
except KeyboardInterrupt: except KeyboardInterrupt:
return False return False
try: try:
words = inp.split(" ") words = inp.split(" ")
pos = cmds pos = self.cmds
index = 0 index = 0
for i,word in enumerate(words): for i,word in enumerate(words):
if not str(type(pos))=="<class 'function'>" and word in pos: if not str(type(pos))=="<class 'function'>" and word in pos: