Skip to content

fix(nu): avoid multiline keybinding commands - #3880

Open
mirsella wants to merge 1 commit into
atuinsh:mainfrom
mirsella:fix/nushell-keybinding-history
Open

fix(nu): avoid multiline keybinding commands#3880
mirsella wants to merge 1 commit into
atuinsh:mainfrom
mirsella:fix/nushell-keybinding-history

Conversation

@mirsella

@mirsella mirsella commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Nushell can expose the multiline source passed to ExecuteHostCommand, which causes Atuin's generated command to appear in the command line and history.

Move the search logic into _atuin_search and have the keybindings execute a single-line command. The per-shell token still distinguishes generated commands from manually entered ones, and exact matching keeps those commands out of Atuin history.

The newer commandline edit --accept path remains generated at runtime so the integration still parses on older supported Nushell versions.

Fixes #2900.

Tested with:

  • cargo fmt --all -- --check
  • cargo +nightly test --locked -p atuin shell --quiet
  • nu-check on Nushell 0.93.0 and 0.114.1
  • isolated PTY tests for edit, accept, and history behavior

@greptile-apps

greptile-apps Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Moves Nushell search logic into _atuin_search, leaving keybindings with single-line generated commands while preserving version-specific edit behavior and filtering generated commands from history.

Confidence Score: 5/5

The PR appears safe to merge.

The generated Ctrl-R and up-arrow commands match the two history-filter variants, and version-specific Nushell behavior remains selected at runtime.

Important Files Changed

Filename Overview
crates/atuin/src/shell/atuin.nu Refactors search execution and exact history filtering; no concrete defect found.
crates/atuin/src/command/client/init/nu.rs Updates the up-arrow binding to the new boolean command interface consistently.

Reviews (1): Last reviewed commit: "fix(nu): avoid multiline keybinding comm..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Atuin Nushell Integration Issue: Keybinding Commands Appearing in History

1 participant