bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug Report: Readline vi mode does not reset to insert mode before execut


From: M
Subject: Bug Report: Readline vi mode does not reset to insert mode before executing commands
Date: Fri, 21 Jun 2024 12:05:45 +0200

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 on set 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

[Prev in Thread] Current Thread [Next in Thread]