2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 11:01:09 +00:00

Fix tab completion in middle of command

When doing tab completion, ignore content after the current index.
This was confusing the tab completion routine.  Also silently
ignore traces by default
This commit is contained in:
Jarrod Johnson 2015-02-03 11:01:05 -05:00
parent 6d73eb023b
commit ae1e3f2b8d

View File

@ -169,14 +169,16 @@ def completer(text, state):
try:
return rcompleter(text, state)
except:
import traceback
traceback.print_exc()
pass
#import traceback
#traceback.print_exc()
def rcompleter(text, state):
global candidates
global valid_commands
cline = readline.get_line_buffer()
cline = cline[:readline.get_endidx()]
if len(text):
cline = cline[:-len(text)]
args = shlex.split(cline, posix=True)