Skip to content

[BUG] insert-last-word widget produces corrupted output when bound via zvm_bindkey #344

@BrahmingWu

Description

@BrahmingWu

General information

  • Terminal program: Ghostty 1.3.1
  • Operating system: macOS 26.4.1
  • ZSH framework: zsh
  • ZSH version: 5.9
  • ZVM version: 0.12.0
System report (zvm_system_report)

Basic examination

  • I have read through the README page
  • I have the latest version of zsh-vi-mode
  • I have tested with another terminal program (same behavior in Terminal.app and Alacritty)

Problem description

When binding Esc . (or any other key sequence) to the Zsh built-in widget insert-last-word inside zsh-vi-mode, the executed action does not insert the last argument of the previous command. Instead, it inserts unexpected text that appears to be a corrupted repetition of a completion or edit operation (e.g., fragments like ls .con//gls). This indicates the insert-last-word widget is not working properly under zsh-vi-mode.

Reproduction steps

  1. Load zsh-vi-mode and configure the key binding in ~/.zshrc (after plugin load):
    function zvm_after_init() {
      zvm_bindkey viins '^[.' insert-last-word
    }
    # Set a short timeout to distinguish Esc . from Esc alone
    ZVM_KEYTIMEOUT=5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions