How do I create a shortcut that opens Cygwin bash shell on a directory of my choosing (UNC especially)?
Solution 1:
I haven't toyed with UNC paths, but in general you have to use forward slashes instead of backslashes I believe. For regular drives, you can use /cygdrive/c
for example to access the C drive.
In a batch file, to open the shell to the root of C:
you could use:
c:\cygwin\bin\bash.exe --login -i -c 'cd "/cygdrive/c";bash'
You may also be interested in chere
a context menu entry for Open bash here:
Solution 2:
I added a subfolder in registry at HKEY_CLASSES_ROOT/Directory/shell
, added key Cygwin
with key command
where the command's value is
cmd.exe /k "E:\PATHTOCYGWIN\bin\bash --login -i -c "cd ""%L"";bash""