A recent upgrade appears to have broken the ability of Windows-native gvim (7.4) to run :!-like commands using Cygwin's bash as the shell. (No doubt it's something that's been configured for my convenience that I'll have to find and deconfigure.)

If you can tell me how I might fix it, work around it, or help things along, thank you, etc., etc.

The minimal example

First, enter this list into the buffer of a new gvim window:


Then, configure the shell settings to Cygwin bash:

:let &shell="C:\\cygwin64\\bin\\bash.exe"
:let &shellcmdflag="-c"
:let &shellxquote="\""

Finally, run wc using the shell, replacing the current buffer contents.


On the Windows 10 machine, I get a few seconds of hang followed by an E485 at the bottom of the window:

shell returned 254

E485: Can't read file C:/Users/psmay/AppData/Local/Temp/VIo4283.tmp

The Windows 8.1 machine I have on remote, which is otherwise similarly configured, behaves appropriately, replacing the buffer with wc's output:

 5  5 15
  • I've observed a similar issue since the last W10 update. My opinion is that you should report it to cygwin mailing list. Dec 17, 2015 at 8:25
  • @shellter: I actually did some searching to inform my guess of which SE site to use for this question. Naturally, I guessed wrong.
    – psmay
    Dec 17, 2015 at 14:46

1 Answer 1


Short version: Switch to an x64 build of Vim.

After tracking down some more recent Vim builds, I found out that the latest 32-bit (x86) build fails the above test in the same way, but the 64-bit (x64) build succeeds. Incidentally, the gvim already on my machine is from the installer on Vim's own download page, which is evidently also a 32-bit build.

(Still no idea, though, why running 64-bit Cygwin from 32-bit Vim is suddenly illegal.)

  • I had similar problem. On cygwin mailing list I've found a thread that made me look for another build of gvim. Since my migration (to this version), I'm now able to run system("ls") again. Jan 2, 2016 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy