You are not logged in.

#1 2015-10-28 08:41:08

calid
Member
Registered: 2013-10-18
Posts: 5
Website

bash - show vi mode in prompt using custom mode strings

Hello,

When using vi editing mode, bash has a 'show-mode-in-prompt' option that will enable displaying the current editing mode.  However, this is hardcoded to only display '+' and ':' for the modes, and only at the very beginning of the prompt.  I've published patched versions of bash 4.3 / readline 6.3 to github that support user configurable mode strings as well as a '\m' escape to specify where in the prompt you want the mode string to occur.

https://github.com/calid/bash

This is what it looks like in action:
7P9FqOn.gif?3

See the github readme for details and instructions.  Feedback welcome, enjoy!

Last edited by calid (2015-10-28 11:38:38)

Offline

Board footer

Powered by FluxBB