Open Cygwin at a specific folder

后端 未结 29 2648
悲哀的现实
悲哀的现实 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:22

    I used the following lines of code to start zsh in the current directory in Win7.

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

    note that i used %V instead of %L or %1 (since both didn't work for me)

提交回复
热议问题