Open Cygwin at a specific folder

后端 未结 29 2597
悲哀的现实
悲哀的现实 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条回答
  •  Happy的楠姐
    2020-12-12 09:15

    Probably the simplest one:

    1) Create file foo.reg

    2) Insert content:

    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\Directory\background\shell\open_mintty]
    @="open mintty"
    
    [HKEY_CLASSES_ROOT\Directory\background\shell\open_mintty\command]
    @="cmd /C mintty"
    

    3) Execute foo.reg

    Now just right-click in any folder, click open mintty and it will spawn mintty in that folder.

提交回复
热议问题