I noticed that after I added the set show-all-if-ambiguous on line to my ~/.inputrc, whenever I pressed tab to indent a block, it would show me the bash Display all ... possibilities? (y or n) prompt, and leave me unable to indent the actual code.

Is there any way to keep that line in my .inputrc but still have the tab key work as expected in the Python interpreter?

This is in my VirtualBox Ubuntu 12.04 VM, if it matters.

EDIT: Curiously, I now have a different issue with the Python shell that comes with Django -- when I press tab, I get Python tab completion, but only with one Tab press. I've opened a separate question here for it.


Take a look at the conditional init constructs: https://www.gnu.org/software/bash/manual/html_node/Conditional-Init-Constructs.html#Conditional-Init-Constructs

I don't know your full setup, but I'm guessing you should probably try something like:

$if Bash
set show-all-if-ambiguous on

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.