jeffreytse/zsh-vi-mode

Arrow key does not do prefix-based history completion

Open

#266 opened on Feb 11, 2024

View on GitHub
 (4 comments) (4 reactions) (1 assignee)Shell (147 forks)github user discovery
good first issue

Repository metrics

Stars
 (4,364 stars)
PR merge metrics
 (PR metrics pending)

Description

General information

  • Terminal program: iTerm.app 3.4.23 (xterm-256color)
  • Operating system: macOS 14.3.1 (23D60)
  • ZSH framework: oh-my-zsh master (bebd9ea)
  • ZSH version: zsh 5.9 (x86_64-apple-darwin23.0)
  • ZVM version: zsh-vi-mode 0.11.0 (781e9a5, 2024-02-11 13:41:10 -0800)
  • Installed via Homebrew

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

Problem description

Without enabling zsh-vi-mode, if I type curl and press ⬆️ key on my keyboard, I get the last command executed with curl prefix (and successive hits to ⬆️ ⬇️ cycles between those only).

However if I enable zsh-vi-mode, type curl and hit ⬆️ , I only get the last executed command (doesn't start with curl). What would be the reason for that?

Reproduction steps

  1. enable zsh-vi-mode
  2. type curl
  3. press up arrow key
  4. prompt now has the last executed command that doesn't start with curl...

Expected behavior

By default zsh (or maybe something else I installed) ensures only commands with curl prefix are provided based on up/down arrow keys.

Contributor guide