bug-readline
[Top][All Lists]
Advanced

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

Re: [Bug-readline] vi-{cmd, ins}-mode-string and show-mode-in-prompt


From: Rob Foehl
Subject: Re: [Bug-readline] vi-{cmd, ins}-mode-string and show-mode-in-prompt
Date: Sun, 10 Dec 2017 00:02:05 -0500 (EST)

On Sat, 9 Dec 2017, Chet Ramey wrote:

So the problem is simply that you don't like the default strings in
bash-4.3?

Well, subjectively, yes. There's a difference between "don't like" and "won't work in the larger context of complex prompts", though.

If this is a serious problem, move the setting of the variable into the
bash startup files, where you can run the appropriate `bind' command
based on the values of $BASH_VERSION and $BASH_VERSINFO.

That'd work for bash, but not other readline consumers.

Not exactly.  The documentation is garbled, but it's simply wrong to
assume that the behavior of show-mode-in-prompt being a toggle to turn
the behavior on and off would have changed between bash-4.3 and bash-4.4
without me noting the change in the change log. The documentation is
obviously in error, but the desired behavior is that show-mode-in-prompt
toggle the display of the mode characters (4.3) or mode strings (4.4).

The documentation doesn't mention show-mode-in-prompt outside of its own description, and the man page doesn't mention the mode strings there, either. Why would anyone unfamiliar with its history assume it's relevant? I certainly didn't. Regardless, the patch doesn't change the behavior of show-mode-in-prompt itself in any way.

On desirability: the default behavior of show-mode-in-prompt doesn't play well with complex prompts, and setting any of the mode string variables would seem to indicate intent that they be used, in which case show-mode-in-prompt is superfluous. Does a use case exist for setting mode strings but not using them?

I've attached another version of the patch that's arguably more robust across mode changes with odd combinations of settings.

-Rob

Attachment: readline-mode-strings-v2.patch
Description: Text document


reply via email to

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