Skip to content

question: DIFFNAV_EDITOR is not running in Windows #138

Open

Description

@AlbertoVPersonal

Description

When I'm checking a diff, I cannot open the editor to see the selected file.

Steps to reproduce

  1. Set DIFFNAV_EDITOR environment variable with value zed
  2. Open a diff with "diffnav" as pager
  3. Select a file
  4. Click o

Expected behaviour

The file should be opened using the defined editor.

Environment

  • Windows 11 Pro x64
  • Command line: DOS or Powershell
  • diffnav version v0.10.0

Additional context

echo %DIFFNAV_EDITOR%
# response
zed

I use diffnav from gh dash but if I do it manually the result is the same.

gh pr diff https://github.com/<my_organization>/icon/pull/664 | diffnav

It does not work under these test conditions:

  • Using PowerShell.
  • Setting the editor to code.
  • Changing the user variable to a system variable.

Activity

  1. Booyaka101 commented on Jun 6, 2026

    @Booyaka101
    Contributor

    diffnav reads $EDITOR for the o action (it's in the README keybindings: "Open file in $EDITOR"). DIFFNAV_EDITOR isn't a variable diffnav looks at, so with it unset nothing happens — setting EDITOR=zed should do it.

    One Windows gotcha I confirmed while looking into this: if the editor isn't on your PATH, the launch fails quietly with no message, so it looks like nothing happened. So either make sure zed is on PATH, or point EDITOR at the full path to zed.exe.


    Disclosure per AI_POLICY: investigated with Claude Code; I verified the $EDITOR behaviour and the silent-failure-when-not-on-PATH case on a Windows machine myself before posting.

  2. AlbertoVPersonal commented on Jul 7, 2026

    @AlbertoVPersonal
    Author

    I fixed it using this one:

    make sure zed is on PATH

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions