X-Git-Url: https://vcs.fsf.org/?p=rainbowstream.git;a=blobdiff_plain;f=rainbowstream%2Finteractive.py;h=45b7853bc6829f782e3a057ef480bf3c68083fec;hp=afbbc0549a6712acc0d9433660e020a3ad1b5d30;hb=39b8e6b3486c527291e91838c9adf139a5c95af6;hpb=632c6fa515fe36cf88ef2bf39378464bd24701d8 diff --git a/rainbowstream/interactive.py b/rainbowstream/interactive.py index afbbc05..45b7853 100644 --- a/rainbowstream/interactive.py +++ b/rainbowstream/interactive.py @@ -27,11 +27,11 @@ class RainbowCompleter(object): words = origline.split() if not words: - self.current_candidates = sorted(self.options.keys()) + self.current_candidates = sorted([c for c in self.options]) else: try: if begin == 0: - candidates = self.options.keys() + candidates = [c for c in self.options] elif words[-1] in self.options[words[0]]: candidates = [] else: @@ -39,8 +39,8 @@ class RainbowCompleter(object): candidates = self.options[first] if being_completed: - self.current_candidates = [ w for w in candidates - if w.startswith(being_completed) ] + self.current_candidates = [w for w in candidates + if w.startswith(being_completed)] else: self.current_candidates = candidates @@ -84,12 +84,8 @@ def init_interactive_shell(d): Init the rainbow shell """ readline.set_completer(RainbowCompleter(d).complete) - readline.parse_and_bind('set editing-mode vi') - readline.parse_and_bind('set show-all-if-ambiguous on') - readline.parse_and_bind('set show-all-if-unmodified on') readline.parse_and_bind('set skip-completed-text on') if 'libedit' in readline.__doc__: readline.parse_and_bind("bind ^I rl_complete") else: readline.parse_and_bind("tab: complete") -