[debian-mysql] Bug#975911: mariadb-client: appears to ignore ~/.editrc keybind settings
The Wanderer
wanderer at fastmail.fm
Thu Nov 26 17:50:26 GMT 2020
On 2020-11-26 at 09:43, The Wanderer wrote:
> Package: mariadb-client
> Version: 1:10.5.8-3
> Severity: normal
>
> Dear Maintainer,
>
> I have just upgraded mariadb-client (and -server) from version 10.3.x to
> version 10.5.8-3. As far as I can tell, no versions between those made
> it into testing. If I'm not mistaken, the last version I was running
> pre-upgrade was 10.3.24-2.
>
> Prior to the upgrade, in an interactive session within the 'mysql'
> terminal-based client, Ctrl+W would kill everything to the left of the
> cursor up to the first word boundary (which in practice appeared to mean
> "whitespace"), but nothing to the left of that point.
>
> This is apparently not the default, but I have it configured in
> ~/.editrc. The contents of that file are as follows:
>
> ---8<---
> bind "^U" vi-kill-line-prev
> bind "^W" ed-delete-prev-word
> ---8<---
>
> Following the upgrade and a restart of the client, in such an
> interactive session, Ctrl+W now kills everything to the left of the
> cursor, all the way to the beginning of the line. This appears to be the
> default behavior, used when no alternate configuration has been applied.
>
> It thus appears as if the settings I have in place in ~/.editrc are
> simply being ignored. The environment variable EDITRC is not set.
> Launching with it explicitly set does not appear to change anything.
On further investigation, this might not be the full explanation after
all.
According to 'man editline', the ed-delete-prev-word function is bound
by default to Ctrl+Meta+H. When I execute that key combination, it kills
not up the preceding whitespace (as Ctrl+W used to do), but to the
preceding word boundary (using what seems to be the same criteria as
would be used by '\b' in a regular expression).
https://certif.com/cplot_print/libedit.html and
https://www.certif.com/spec_print/editline.html document the "kill
until previous whitespace" functionality as being provided by
em_kill_region. 'man editline' refers to em-kill-region, but states that
it kills everything between the cursor and "the mark"; since the mark
must be explicitly placed and omitting it means invoking this function
is an error, that doesn't seem to be equivalent to "kill until previous
whitespace".
The latter of those pages documents the readline equivalent of
ed-delete-prev-word as being backward-kill-word, and the one for "kill
until previous whitspace" as being unix-word-rubout. I haven't found a
way to readily test the behavior of these on my system yet, so I don't
know for sure which if any of them provide the behavior I expected.
I'm coming to suspect that there may be no way to regain access to the
previous behavior without either severely patching libedit (either
locally or upstream) or reverting to have mariadb-client use readline
again instead. Either of those things would be drastic, but for this
regression to be permanent would be quite unfortunate.
Either way, the fact that ~/.editrc does not seem to be being respected
is still an issue, which may or may not reside in mariadb-client. This
additional discovery may simply mean that it was being ignored
previously as well, I just hadn't noticed.
I filed this as a bug report on account of regression, but it's starting
to look like it might belong more in more general discussion channels
for the time being, until the actual root nature of the regression can
be figured out...
--
The Wanderer
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-mysql-maint/attachments/20201126/44b1cb57/attachment.sig>
More information about the pkg-mysql-maint
mailing list