Skip to content

edit commands fail on nushell #5211

@mirsella

Description

@mirsella

Describe the bug

trying to use the "e" key to open a file fail when using nushell

To Reproduce

  • nu
  • lazygit
  • e on a file

Expected behavior

run the shell command to open editor

Screenshots

Image

Version info:

commit=v0.58.1, build date=2026-01-12T20:22:34Z, build source=binaryRelease, version=0.58.1, os=linux, arch=amd64, git version=2.52.0

workaround

in my user config:

os:
  edit: 'if ($env.NVIM? | is-empty) { nvim -- {{filename}} } else { nvim --server $env.NVIM --remote-send "q"; nvim --server $env.NVIM --remote-tab {{filename}} }'
  editAtLine: 'if ($env.NVIM? | is-empty) { nvim +{{line}} -- {{filename}} } else { nvim --server $env.NVIM --remote-send "q"; nvim --server $env.NVIM --remote-tab {{filename}}; nvim --server $env.NVIM --remote-send ":{{line}}<CR>" }'
  openDirInEditor: 'if ($env.NVIM? | is-empty) { nvim -- {{dir}} } else { nvim --server $env.NVIM --remote-send "q"; nvim --server $env.NVIM --remote-tab {{dir}} }'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions