Things You Didn't Know About GNU Readline (twobithistory.org)
from learnbyexample@programming.dev to linux@lemmy.ml on 14 Dec 2023 14:23
https://programming.dev/post/7248262

#linux

threaded - newest

drre@feddit.de on 14 Dec 2023 16:25 next collapse

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

walthervonstolzing@lemmy.ml on 14 Dec 2023 16:55 collapse

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: git.savannah.gnu.org/cgit/bash.git/tree/CHANGES?h…

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.

drre@feddit.de on 14 Dec 2023 19:57 collapse

awesome! thanks the tip!

MonkderZweite@feddit.ch on 15 Dec 2023 12:38 collapse

maintained by a single volunteer.

<img alt="https://xkcd.com/2347/" src="https://imgs.xkcd.com/comics/dependency_2x.png">