/usr/bin/bash: line 1: C:ProgramDatachocolateylibnavitoolsnavi.exe: command not found
Describe the bug Any navi command results in a error in windows 10, installation from scoop.
To Reproduce Steps to reproduce the behavior:
- Use winget to install navi from scoop, version 2.23
- Open cmd and run navi
- Error shown: /usr/bin/bash: line 1: C:ProgramDatachocolateylibnavitoolsnavi.exe: command not found
Expected behavior Normally run navi
Screenshots
Versions:
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! :)
It is correct in windows .
If you want use navi in windows, you must create command by yourself.
First, you should create your cheats file. by default,It is %AppData%\navi\cheats\
Then create yourself cheats fold, just like my_cheats,if fold not exist ,create it. the full path is %AppData%\navi\cheats\my_cheats\
Then you can create your first sample cheat file in my_cheats folder. There is my ii.cheats
% ii
# ii open my_cheats path
powershell.exe 'ii "\$env:AppData\navi\cheats\my_cheats"'
Then, run command navi -p C:\Users\{user}\AppData\Roaming\navi\cheats\my_cheats, select ii command.
the -p param is your chaeats folder's real full path.
It will work.
Next time,just run navi command ,your cheats file in my_cheats will include.
I have the same problem in PowerShell, but I downloaded the binaries from the release page (not via a package manager).
If I run .\navi.exe repo browse and select a source, cheats will be downloaded, but I still get the same /bin/bash: line 1: C:Toolsnavinavi.exe: command not found as described.
Ah, I solved it. It was hard to find, but it is actually in the documentation.
First, create a config file:
.\navi.exe info config-example > $ENV:AppData\navi\config.yaml
Then, change shell → command from "bash" to "cmd.exe" (as it says in the comment). Done.
In case you want to use bash I described a workaround for this problem in #794 It enables almost all previewing capabilities of navi when using bash on windows
Hi @wangshuai-007, is the issue still present in the latest version (2.24.0)? If not, I'm thinking of closing this issue.
Hi @wangshuai-007, is the issue still present in the latest version (2.24.0)? If not, I'm thinking of closing this issue.
My install type is choco
And the choco latest version is 2.23.0
After install navi by navi-v2.24.0-x86_64-pc-windows-gnu.zip and replace in C:\ProgramData\chocolatey\bin\navi.exe it works well.
Now, It will display:
exec: "bash" : executable file not found in %PATH%
For now, you need to add a manual configuration file, see @Reyhn3's comment:
Ah, I solved it. It was hard to find, but it is actually in the documentation.
First, create a config file:
.\navi.exe info config-example > $ENV:AppData\navi\config.yaml
Then, change shell → command from "bash" to "cmd.exe" (as it says in the comment). Done.
Note that since 2.24.0 you can call powershell instead of cmd as shell.
I think we're going to fix those issues impacting windows in the upcoming weeks/months since it should work by default on Windows.
@wangshuai-007 Your shell part of the configuration file should look like this:
shell:
command: powershell