[Dynamic-Lang-SIG] Tab completion in interactive interpreters

Paul Visscher [Address Concealed]
Thu Nov 15 00:37:08 EST 2007


Many dynamic languages have interactive interpreters that you can start.
They are also called REPLs (read-eval-print loops). REPLs are nice, but
they're even nicer with tab completion.

To enable tab completion in Ruby's irb, type

  require 'irb/completion'

or put that in your ~/.irbrc to get it to load automatically.

Python:

  import rlcompleter
  import readline
  readline.parse_and_bind("tab: complete")

If you put that in your ~/.pythonrc.py, then you can run

  import user

from the repl.

guile:

  (use-modules (ice-9 readline))
  (activate-readline)

--paulv


More information about the Dynamic-Lang-SIG mailing list