Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] insert-last-word gets stuck at comments
- X-seq: zsh-workers 49195
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Frederick Eaton <frederik@xxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [BUG] insert-last-word gets stuck at comments
- Date: Mon, 26 Jul 2021 15:50:17 -0700
- Archived-at: <https://zsh.org/workers/49195>
- In-reply-to: <20210726070654.v33wzoiwpqibwlas@localhost>
- List-id: <zsh-workers.zsh.org>
- References: <20210726070654.v33wzoiwpqibwlas@localhost>
On Mon, Jul 26, 2021 at 12:07 AM Frederick Eaton <frederik@xxxxxxx> wrote:
>
> This may be a somewhat minor bug, but I think that when
> interactive_comments is set, the 'insert-last-word' widget gets stuck
> on lines that are fully commented:
I'm able to reproduce this. A fully-commented line has an event
number but contains no words; e.g., it's also an "error" to attempt to
refer to event number 3 e.g. with !3 in the example:
> $ zsh -f -i
> % setopt interactive_comments
> % echo hi #comment
> hi
> % # blah blah
> % echo bye #comment
> bye
> % echo foo
> foo
> % echo <Esc>.<Esc>.<Esc>.
At this point:
% !3
zsh: no such word in event
Even though !2 and !4 work as expected. So insert-last-word gets as
far as event 3 and then gets the no-such-word error, which interrupts
it.
A workaround is to enable smart-insert-last-word.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author