def setup(): """ Install fancycompleter as the default completer for readline. """ completer = Completer() readline = completer.config.readline if has_leopard_libedit(completer.config): readline.parse_and_bind("bind ^I rl_complete") else: readline.parse_and_bind('tab: complete') readline.set_completer(completer.complete) return completer