Zend certified PHP/Magento developer

Changing bash prompt in operator pending mode

I’m pretty happy with the normal and insert mode being visible in my prompt thanks to my .inputrc file:

set vi-cmd-mode-string :
set vi-ins-mode-string +

However there are other two “modes” which escape from this settings:

  1. when searching, i.e. after hitting / (preceded by Escape),
  2. and, the reason why I’m posting this question, in operator pending mode.

My question is about point 2 especially: is it possible to control the prompt when in operator pending mode, when using vi editing mode in bash? If so, how?

The reason I’m interested in this, is that usually (actually always for obvious reasons) the prompt in operator pending mode is quite short, e.g. (arg: 99) with respect to my normal prompt, which can be something like this enrico:happyfolder, therefore, whenever I press a number, the command I’m editing jumps several characters to the left under my eyes, which distracts and slows me down.

As regards point 1., the character / appears as the first character in the prompt, which helps me understand I am in search mode (by the way the : symbol defined above disappears, which also helps). I have absolutely no clue what I did to have this, if someone can help me understand, that would be nice.