Hacker News new | ask | show | jobs
by niggler 4786 days ago
on OSX you need

    readline.parse_and_bind('bind ^I rl_complete')
1 comments

I use a combination of all these 3 tricks as I have my dotfiles shared between Mac and Linux.

Basically my pythonstartup.py contains the extra check for os:

    AP_AUTOCOMPLETE=False
    import sys
    try:
        import readline
    except ImportError:
        print "Module readline unavailable"
    else:
      import rlcompleter
      readline.parse_and_bind("tab: complete")
      if sys.platform == 'darwin':
            readline.parse_and_bind("bind ^I rl_complete")
      AP_AUTOCOMPLETE=True