Open Cygwin at a specific folder

后端 未结 29 2439
悲哀的现实
悲哀的现实 2020-12-12 08:49

How can I create a Cygwin shortcut that will open Cygwin at a specific folder? This would obviate having to type

cd /cygdrive/c/Users/Tom/Desktop/

29条回答
  •  囚心锁ツ
    2020-12-12 09:14

    I don't know why I had to wast so much time, but this works for me on win 10, 64 bit:

    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\Directory\Background\shell\cygwin_bash]
    @="Open Cygwin Here"
    
    [HKEY_CLASSES_ROOT\Directory\Background\shell\cygwin_bash\command]
    @="C:\\cygwin64\\bin\\mintty.exe -i /Cygwin-Terminal.ico C:\\cygwin64\\bin\\bash.exe --login -c \"cd \\\"%V\\\" ; exec bash -rcfile ~/.bashrc\""
    

提交回复
热议问题