[Top][All Lists]

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

Re: bug: 'vi-fword' binding command does the same as 'vi-fWord'

From: Andrey Butirsky
Subject: Re: bug: 'vi-fword' binding command does the same as 'vi-fWord'
Date: Mon, 30 Dec 2019 04:07:19 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Thunderbird/72.0

On 30.12.2019 03:11, Chet Ramey wrote:
On 12/29/19 3:45 PM, Andrey Butirsky wrote:

the bug is: if any Readline binding command names differs only in
character's case, these commands is indistinguishable and do the same

For example, 'vi-fword' binding command erroneously does the same as
'vi-fWord' one, that is - jumps on "big" (space separated) words; while it
is alias of||"vi-forward-word" command and as such should jump on a "small"
vi words. For 'vi-fWord', "vi-forward-bigword" alias exists:
Yes, you should always use the `long' names. The short versions exist only
because they always have. The long versions were added in
bash-4.2/readline-6.2 to solve exactly this problem.

Of course, after digging into the code, I know now what the problem is and how to workaround it.
But can we try to fix it? It's literally the bug just from the code.

Considering these vi-* commands are undocumented, it's very confusing right now, even if you look into the code.

So maybe use case-sensitive string comparison function here? I'm sorry I'm not familiar with the code.

Or, if we still need that weird binding here, swap

{ "vi-bword", rl_vi_bword },


{ "vi-bword", rl_vi_bWord },

to at least partially eliminate the confusion.

What do you think?

reply via email to

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