bug-bash
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix READLINE_ARGUMENT with "M-1 M-2" and with `vi-arg-digit'


From: Koichi Murase
Subject: Re: [PATCH] Fix READLINE_ARGUMENT with "M-1 M-2" and with `vi-arg-digit'
Date: Tue, 29 Jun 2021 04:41:09 +0900

2021年6月29日(火) 4:33 Chet Ramey <chet.ramey@case.edu>:
>
> On 6/27/21 8:12 AM, Koichi Murase wrote:
> > Description:
> >
> >    Now "bind -x" can be used with numeric arguments when the numeric
> >    arguments are specified by e.g. "M-1 2 3".  However, when the
> >    numeric arguments are specified by e.g. "M-1 M-2 M-3", it still fails
> >    with the error message `bash_execute_unix_command: cannot find
> >    keymap for command'.  It fails too when the arguments are specified
> >    through `vi-arg-digit' in the vi-command map.
>
> Thanks for the report. Wow, do people use M-1 M-2 to specify multiple-
> digit arguments?

There are two ways to send meta modifiers (ESC) depending on the
terminal emulator and its setting. One is to first press the Escape
key and then press 1 or 2. Another is to press 1 or 2 with the Meta
key being pressed. I use the latter, and in that case, it is intuitive
to input multiple-digit numbers with the Meta key kept to be pressed.

> Anyway, I don't see how this code can work if the command following the
> digit argument is something like M-a that traverses into a new keymap.
> It should return M-a ("\ea"), but it looks like it will just return "a".

Ah, OK. You're right. Thank you for pointing it out. I'll modify it.

--
Koichi



reply via email to

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