nushell / nushell/reedline

vichangemode fails to switch to normal mode after executehostcommand

Open
#1,070 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
818
Forks
249
Avg merge
4d 14h
Merged PRs (30d)
30

Description

Platform MacOS
Terminal software Ghostty

I have following keybinding:

{
  name: go_dir, modifier: none, keycode: char_g, mode: [vi_normal]
  event: [
    { send: executehostcommand, cmd: "cd (fd -t d | sk -p 'Go to dir : ')" }
    { send: vichangemode, mode: normal }
  ]
} 

After triggering it, it successfully changes directory but shell stays in insert mode instead of intended normal mode.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the keybinding on macOS with Ghostty, using executehostcommand followed by vichangemode in the issue's example. Trace how those two events are processed and verify that the editor ends in normal mode after the directory change completes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.