[Top][All Lists]

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

Re: core dump an alt. alt1 alt.

From: Mike Jonkmans
Subject: Re: core dump an alt. alt1 alt.
Date: Tue, 9 Jun 2020 11:19:18 +0200

On Mon, Jun 08, 2020 at 08:43:31PM -0400, Chet Ramey wrote:
> On 6/8/20 6:54 PM, bashbug@jonkmans.nl wrote:
> > Bash Version: 4.4
> > Patch Level: 20
> > Release Status: release
> > 
> > Description:
> >     Got a core dump (segmentation fault) when i type: Alt-. Alt-1 Alt-.
> You tried to redo `.'. The way this happens is you are in command mode,
> run that yank-last-arg binding (which sets the last vi-mode command to
> `.'), then try to run it again, but miss the timeout described in the last
> paragraph of my previous message, which results in you trying to redo the
> last command (`.') in a context where the binding for `.' is vi-redo. I put
> something in to stop that at the same time I made the other changes
> described in my previous message.

The problem from the previous message was the trigger to try this. :)

Are you sure that it is a timeout problem in this case?
Because if I prepend the followong line to the inputrc:
        set keyseq-timeout 0
the core dump is also generated.

It seems i enter command mode after I press Alt-1.
The following Alt-. probably gets split into Alt(Escape) and a '.'
The Escape breaks off the Alt-1 'mode' and then the '.' becomes vi-redo.
But I fail to see why the vi-redo is bound to vi-redo here. :(

With this inputrc:
        set keyseq-timeout 0
        set editing-mode vi
        set keymap vi-command
        set show-mode-in-prompt on
        set vi-ins-mode-string "+ "
        set vi-cmd-mode-string ": "
        "\e.": yank-last-arg
        set keymap vi-insert
        "\e.": yank-last-arg

Another, maybe clearer case, typing: Alt-. Esc .
a core dump is also generated.
My expectation would be that:
- Alt-. insert text
- Esc goes to vi-command mode
- . does vi-redo, which is, insert the same text as Alt-. did


Mike Jonkmans <bashbug@jonkmans.nl>

reply via email to

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