• drre@feddit.de
    link
    fedilink
    arrow-up
    7
    arrow-down
    2
    ·
    1 year ago

    I’m using vim mode in my bash and i agree that a mode indicator would be nice

    • wvstolzing
      link
      fedilink
      arrow-up
      6
      ·
      1 year ago

      As of bash 4.3, (which came out nearly 10 years ago) it’s possible to get readline to set a variable to do that: https://git.savannah.gnu.org/cgit/bash.git/tree/CHANGES?h=bash-4.3#n832

      I’ve haven’t used bash in a long time, but there are many questions/answers on stackoverflow that provide hints as to implementing an indicator like that. One zsh’s ‘zle’ (line editor) it’s a matter of setting an environment variable inside a custom prompt; so the bash approach should be similar.