• wvstolzing@lemmy.ml
    link
    fedilink
    arrow-up
    6
    ·
    7 months 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.