git-bashneovim

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


Solution

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

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