Open lisiur opened 2 years ago
Thanks for opening your first issue here! In case you're facing a bug, please update navi to the latest version first. Maybe the bug is already solved! :)
get same error OS: Windows Version: navi 2.20.1 installed by scoop (i chided install by cargo buy is the same prorble)
I think you need to change the shell.command
configuration option in the navi config file (normally under C:\Users\<username>\AppData\Roaming\navi\config.yaml
, like this:
shell:
command: cmd
I'm just starting to use navi in Windows, but I can confirm this works even if you use Powershell (I imagine this just makes navi itself run under cmd
when invoked). And trying to use pwsh
here (Powershell 7) instead of cmd
, I ran into other errors when trying to select a command that uses variables:
EDIT: ah, the issue when using shell.command: pwsh
seems to be already reported.
It'd be great if navi auto-detected which OS it is installed on, and updated the config appropriately.
I have found a workaround for this problem.
You can set the following environment variables in your .bashrc (if you are using git for windows): export NAVI_FZF_OVERRIDES="--preview='navi preview {}'" export NAVI_FZF_OVERRIDES_VAR="--preview='navi preview-var {+} {q} variable '"
If navi is in your PATH this will enable most of navis previewing capabilities.
For powershell you can probably set these environment variables equivalently. Either in your powershell configuration or simply in your Windows configuration.
@denisidoro I did not program in rust before so I can't make a PR out of that but it seems that in actor.rs line 64: let exe = fs::exe_string(); in structures.rs line 48: filesystem::exe_string() do not work well under windows how it is currently used because of the classic slash backslash problem.
Describe the bug An error occurred after exec
navi
in powershell:/bin/bash: line1: C:Users***.cargobinnavi.exe: command not found
To Reproduce Steps to reproduce the behavior:
navi
in powershellExpected behavior A clear and concise description of what you expected to happen. no error
Screenshots If applicable, add screenshots to help explain your problem.
Versions: 2.20.1
Additional context Add any other context about the problem here. Using windows terminal