There is no idiot proof way to do this in MSYS/Cygwin, so you have to resort to parsing native windows utilities. Looking at tools like ipconfig, arp, route, there are few options. The easiest seem to be parsing ipconfig. But the output depends on what you have named your interface, and possibly in what language your Windows OS was provided with. It also depends on how you are connected with your windows host, like via Ethernet, VPN etc.
So you'd see some long constellation of devices:
# ipconfig ... Wireless LAN adapter Local Area Connection* 2: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Wireless LAN adapter Wi-Fi: Connection-specific DNS Suffix . : home IPv4 Address. . . . . . . . . . . : 192.168.1.222 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1 Ethernet adapter Bluetooth Network Connection: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : ...
But here we see we want the one called "home", so we do the following:
alias ip="ipconfig | grep -i ': home' -A1 | grep -i 'IPv4 Address' | cut -d: -f2" # ip 192.168.1.222