How do I find the length of readline's mode string (eg
(ins)) which is printed in front of the bash prompt? This mode string is activated by
set show-mode-in-prompt on in
I want to determine the length of this string from within
I'm trying to do some cursor movement with
tput inside the prompt to print some info on the terminal's right hand side (so that it can be overwritten if need be), then resume printing the prompt on the left, but I need to take into account the length of the mode string.
$PROMPT_COMMAND called again and the prompt reprinted if changing mode (e.g)
vi-ins-mode-string as the prefix?