Re: [read command] Vim cursor shape inconsistent at startup
From:
Mike Jonkmans
Subject:
Re: [read command] Vim cursor shape inconsistent at startup
Date:
Mon, 29 Sep 2025 15:57:57 +0200
On Mon, Sep 29, 2025 at 06:33:45AM +0000, luna via Bug reports for the GNU
Bourne Again SHell wrote:
> Hi bash team,
>
> I noticed that upon read -e while set -o vi is on, the cursor shape does
> not reflect the editing mode. Instead, the cursor shape depends on what it
> was when read -e was executed, which is unexpected.
>
> I had asked this on Unix StackExchange and someone else was able to reproduce
> it.
>
> Is there a known workaround to this?
>https://unix.stackexchange.com/questions/800032/make-set-o-vi-vim-cursor-reflect-editing-mode-when-in-read?noredirect=1#comment1539947_800032
>
> Looking forward to hearing your response!
>
> Thanks,
> Luna
With 'read -e -p "prompt: "', the editting mode is reflected.
Without -p it is not (also not with -p '').
Seems sensible.
Though, i would have liked -p '' to show the editting mode too.
--
Regards, Mike Jonkmans