*Version and Release Status:* Readline 8.2.010-1

*Machine and OS:* Linux artix 6.9.2-artix1-1 #1 SMP PREEMPT_DYNAMIC Sun, 26
May 2024 08:20:18 +0000 x86_64 GNU/Linux

*Compilation Flags:* Not applicable

*Description of the Bug:* When using Readline's vi mode in Bash and
transitioning from insert mode to command mode (normal mode) using the ESC
key, subsequent commands executed do not automatically reset the mode to
insert mode (> prompt) after pressing Enter to execute the command.
Instead, the mode remains in normal mode (: prompt) until the command
completes execution and returns to the shell prompt (> prompt).

*Recipe for Recreating the Bug:*

   1.

   Ensure Bash is configured with Readline vi mode by including the
   following configuration in your ~/.inputrc file:

   set show-mode-in-prompt onset vi-cmd-mode-string
"\1\e]12;#FF7B00\e\\\2"set vi-ins-mode-string "\1\e]12;#FFFFFF\e\\\2"

   2.

   Type any command that takes a long time to execute or requires standard
   input (e.g., pacman -Syu).
   3.

   Press ESC to enter normal mode from insert mode.
   4.

   Press Enter to execute the command.
   5.

   Observe that while the command is executing, the cursor remains in
   normal mode (: prompt) and the cursor color remains orange (#FF7B00).
   6.

   After the command completes execution and returns to the shell prompt (>
   prompt), notice that the mode resets correctly to insert mode and the
   cursor color returns to white (#FFFFFF).

*Expected Behavior:* After executing a command by pressing Enter, Readline
should automatically switch from normal mode to insert mode (> prompt) and
reset the cursor color to white (#FFFFFF).

*Fix for the Bug:* A potential fix could involve modifying the Readline
behavior in vi mode to ensure that after pressing Enter in normal mode, the
mode automatically resets to insert mode, providing a consistent user
experience.

Thank you for your attention to this matter. Please let me know if further
information or testing is required.

Reply via email to