Enable Autocomplete for root on Mac OS X

Are you frustrated by the lack of autocomplete in root’s shell on Mac OS X? I’ve tried a few different solutions, and the easiest / simplest I found is to create an /etc/inputrc file (chown root:wheel and chmod 644) with the following text.

The /etc/inputrc file is used by readline — the input-related library used by bash and most other shells. GNU’s readline init file syntax page documents all the available settings, and Gerard Beekmans Linux initrc file page shows a common initrc for Linux.