Bash doesn't support `show-mode-in-prompt` readline option for `vi` editing-mode on macOS? I've played with vi command-line editing in Bash on Linux, and wanted to enable in macOS too, but while vi editing seems to be supported, I cannot get Bash to display vi's mode on the command-line prompt using show-mode-in-prompt?

set -o vi
bind 'set show-mode-in-prompt on'


Doens't Bash on macOS support show-mode-in-prompt readline option?
The show-mode-in-prompt option was introduced in bash 4.3 (from this SO answer) but Apple supplies version 3.2 (which is probably why zsh will become the default for new users but this old bash will remain for Catalina at least.)

So you need to install a newer version of bash. Package managers like Macports, fink, Homebrew and Nix will have a port of this.

e.g. for Macports . Install Macports as per the guide basically download and eun an installer from the downloaded .dmg

Install bash to /opt/local/bin by

sudo port install bash


Then add to Terminal or iTerm preferences to change the command that is ruin to be this bash explicitly.

This currently gives you bash version 5.