From bc995520b789ac90908ab681ac302bbd0b7c8a63 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 14 Jan 2019 09:15:59 -0500 Subject: [PATCH] Fix confetty tab completion The refactoring to main caused scope of readline to be incorrect. Pulled the scope back into namespace. --- confluent_client/bin/confetty | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/confluent_client/bin/confetty b/confluent_client/bin/confetty index b3756009..951b1998 100755 --- a/confluent_client/bin/confetty +++ b/confluent_client/bin/confetty @@ -856,6 +856,10 @@ def check_power_state(): return +if sys.stdout.isatty(): + import readline + + def main(): global inconsole try: @@ -873,7 +877,6 @@ def main(): if sys.stdout.isatty(): - import readline readline.parse_and_bind("tab: complete") readline.parse_and_bind("set bell-style none")