4

I am trying to run terminal commands from neovim. I launched nvim from git bash. But when I run :!ls I get the error

: /usr/bin/bash: /s: No such file or directory

shell returned 127

I searched the internet, I couldn't find the solution. Can anybody help me with this??

Specs: I installed both git and neovim from the websites. OS: Windows 11.

Running bash commands from neovim would be a useful feature that improves my productivity.

enter image description here

1 Answer 1

4

There are actually a same issue on Neovim’s GitHub.

Try add set shellcmdflag=-c to your config file.

1
  • It works, but not always, as a temporary solution can be used in init.vim :let &shell = '"C:\WINDOWS\system32\cmd.exe"'
    – Grave18
    Commented Feb 5, 2023 at 11:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.