I\'d like to run a long rsync command in Cygwin by double clicking on a .sh file in Windows. It must start in the file\'s containing directory (e.g. /cygdrive/c/scripts/) so th
After looking around different places. What I have managed to come up with is, first select C:\cygwin64\bin\mintty.exe
from the windows "Open with..." dialog
Then edit the registry value of
[Computer\HKEY_CLASSES_ROOT\Applications\mintty.exe\shell\open\command]
to,
C:\cygwin64\bin\mintty.exe -t "%1" /bin/bash -l -i -c "v1=\"$(cygpath -u \"%0\" -a)\" && v2=\"$(dirname \"$v1\")\" && cd \"$v2\" ; exec bash \"%1\" %*"