How to open a Cygwin shell at a specific directory from Netbeans?
mintty
can't directly call cd
because that's a builtin command of the respective shell. What you really want is to start a shell in the correct directory.
I don't know about NetBeans or QuickOpener, but provided currentFolder
contains an absolute Windows path, the following should work:
C:\cygwin\bin\mintty /bin/sh -lc 'cd "$(cygpath "$currentFolder")"; exec bash'
This runs a proper login shell that changes directory and then replaces itself with bash
.
Not quite you asked for, but Cygwin comes with chere which sets up a context menu in Windows Explorer.
This may be a decent substitute for what you ask, and you might be able to check the mechanism that chere
uses to fix your issue.