ForbesLindesay/cmd-shim — pull request #4 by copenhas (2013-10-28 19:44:32+00:00)
Title: Swap out the slashes for msysgit bash support

I was unable to use npm to install a node based git command extension. The `dirname "$0"` command in the shim script always return `.` due to the path returning being a windows path when running in git bash. After playing around and research I found that other git extensions use `sed` to swap out the slashes for similar reasons.

Example: https://github.com/nvie/gitflow/blob/develop/git-flow#L50

I couldn't come up with a good test to prove the issue and the fix. Everything I tried kept resolving. I did copy the `index.js` script into my local npm install and reinstalled the troublesome npm package. After that things worked fine. Tested on Windows 7 git bash and normal command prompt.