You can do something similar using the show-mode-in-prompt option:
show-mode-in-prompt
If set to `on', add a character to the beginning of the prompt indicating
the editing mode: emacs (`@'), vi command (`:'), or vi insertion (`+').
The default value is `off'.
Unfortunately it's currently hardcoded to only use the '+' and ':' chars, and to only display at the beginning of the prompt.
Note that the '\m' escape hasn't been accepted into the mainline yet, so as of now the custom indicators will still only display at the beginning of the prompt in the new versions.
"The decision to conclude its sponsorship of Groovy and Grails is part of Pivotal’s larger strategy to concentrate resources on accelerating both commercial and open source projects that support its growing traction in Platform-as-a-Service, Data, and Agile development."
Unless Pivotal is moving away from the JVM (doubtful), I'm surprised they didn't consider Groovy a natural fit for their 'Agile development' category. Groovy + Spock + Gradle makes for a wonderful TDD experience.
Unfortunately it's currently hardcoded to only use the '+' and ':' chars, and to only display at the beginning of the prompt.
Chet accepted a patch I submitted for custom indicators, and this will be coming in bash 4.4/readline 7.0: http://thread.gmane.org/gmane.comp.shells.bash.bugs/22580/fo...
I have patched versions of bash 4.3/readline 6.3 available on github (the bash page has gifs showing the functionality in action): https://github.com/calid/bash https://github.com/calid/readline
Note that the '\m' escape hasn't been accepted into the mainline yet, so as of now the custom indicators will still only display at the beginning of the prompt in the new versions.