What is the value of &shell
option? It must be /path/to/cygwin/bash
, not something ending with cmd.exe
. The problem is that ^
is an escape character in windows cmd.exe
, so echo 2^5
is somewhat equivalent to echo 2\5
resolving into echo 25
.
If it is cmd.exe
add a line
set shell=/path/to/cygwin/bash
to your vimrc.
Note though that echo 2^^^^5
resolving to echo 2^5
is somewhat strange (in plain cmd.exe
it is echo 2^^5
), but I saw very long discussion on vim-dev regarding escaping issues for cmd.exe
some time ago, so it may be one of them. Should not happen on the most recent vim (or it is a bug).