Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/src/tcf/shell.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/python/src/tcf/shell.py b/python/src/tcf/shell.py
index cd1459121..4073463ab 100644
--- a/python/src/tcf/shell.py
+++ b/python/src/tcf/shell.py
@@ -104,12 +104,16 @@ class Shell(code.InteractiveConsole, protocol.ChannelOpenListener,
def interact():
+ shell = Shell()
try:
# enable commandline editing if available
- import readline # @UnusedImport
+ import readline
except ImportError:
pass
- shell = Shell()
+ else:
+ import rlcompleter
+ readline.set_completer(rlcompleter.Completer(shell.locals).complete)
+ readline.parse_and_bind("tab: complete")
shell.interact("TCF Shell")
if __name__ == "__main__":

Back to the top