How to change cursor shape depending on VI mode in Bash?
I have the following line in my .bashrc: set -o vi And I want my cursor to have a pipe shape when I am in insert mode and a block shape when I am in command mode, like what I would have in Vim if I placed the following in my .vimrc: let &t_SI = "\e[6 q" let &t_SR = "\e[4 q" let &t_EI = "\e[2 q" Except in this case I want to have the equivalent behavior on the command line. I found a partial answer to my question here - https://unix.stackexchange.com/questions/22527/change-cursor-shape-or-color-to-indicate-vi-mode-in-bash - written by @gogolb. Here is the answer, copied: #!/bin/bash # Script