From 0977ef02c4e47f278b1d89b12fe36f327da366e0 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 2 Jun 2016 20:50:52 -0700 Subject: [PATCH] do tab-completion on OS-X stock python too (libedit) Apple's stock python doesn't use GNU libreadline, instead it uses BSD libedit with a readline compatibility interface. The syntax to enable tab completion is different for libedit. By including both bindings, autocomplete should work on both flavors. Closes #37. Thanks to @wsanchez for the catch and the fix. --- src/wormhole/codes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wormhole/codes.py b/src/wormhole/codes.py index 44f2665..a439613 100644 --- a/src/wormhole/codes.py +++ b/src/wormhole/codes.py @@ -88,6 +88,7 @@ def input_code_with_completion(prompt, initial_channelids, get_channel_ids, import readline c = CodeInputter(initial_channelids, get_channel_ids, code_length) readline.parse_and_bind("tab: complete") + readline.parse_and_bind("bind ^I rl_complete") readline.set_completer(c.wrap_completer) readline.set_completer_delims("") except ImportError: