I'm on Yosemite, using vi mode in bash (set -o vi in .bash_profile) and I want to have the prompt indicate if I'm in edit or command mode. I looked around and found that this feature has been implemented in bash 4.3 (see https://unix.stackexchange.com/a/116385/46076) and can be turned on by setting the variable show-mode-in-prompt to on. I installed bash 4.3 using homebrew following these instructions. Now, when I execute bash --version I see GNU bash, version 4.3.33(1)-release (x86_64-apple-darwin14.1.0) and brew info readline returns readline: stable 6.3.8 (bottled) so it looks like I'm using the correct versions. However, when I execute set show-mode-in-prompt on or add it to ~/.inputrc based on the readline manual, the prompt still doesn't change based on the vi mode. What am I doing wrong?


Looks like I didn't do anything wrong and an additional reboot is all that was needed.


In my situation, although bash --version shows 4.3.42(1)-release, echo $BASH_VERSION still showing 3.*, then I realize the default bash haven't been changed, please refer to this link: terminal - Update bash to version 4.0 on OSX - Ask Different


put bind 'set show-mode-in-prompt on' into bash_profile ;) don't thanks me.

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .