From ae1e3f2b8dbde0d008c6516991af5f86fccbe975 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 3 Feb 2015 11:01:05 -0500 Subject: [PATCH] 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 --- confluent_client/bin/confetty | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/confluent_client/bin/confetty b/confluent_client/bin/confetty index 73476928..384b4255 100755 --- a/confluent_client/bin/confetty +++ b/confluent_client/bin/confetty @@ -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)