nushell / nushell/nushell

keybind: `until` don't work with `ExecuteHostCommand`

Open
#17,005 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A:line-editor
Dominant language
Rust
Stars
40.5k
Forks
2.3k
Avg merge
1d 14h
Merged PRs (30d)
79

Description

$env.config.keybindings ++= [{
    modifier: control
    keycode: char_e
    mode: emacs
    name: eol_or_fzf
    event: {
      until: [
        { send: ExecuteHostCommand, cmd: "^false" }
        { send: HistoryHintComplete }
        { edit: MoveToLineEnd, select: false }
      ]
    }
}]

https://github.com/nushell/reedline/blob/22768f3e01523e3a2ea7d521f298909155a22496/src/engine.rs#L1173-L1176
https://github.com/nushell/reedline/blob/22768f3e01523e3a2ea7d521f298909155a22496/src/engine.rs#L810-L818

reedline seems never execute the command and check exit code. it just emit the command to nushell?
so the false command prevent the until loop iteration.

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 with the linked src/engine.rs sections around lines 1173-1176 and 810-818, then reproduce the keybinding example in Nushell. Trace how ExecuteHostCommand is emitted and whether its exit status reaches the until loop. Done means the command is executed and a failing false command prevents the next until iteration.

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
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.