Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to run commands with neovim, when launched from git bash

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

like image 988
Sathish Kannan Avatar asked Sep 04 '25 01:09

Sathish Kannan


1 Answers

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

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

like image 85
Max Shen Avatar answered Sep 07 '25 17:09

Max Shen