14,970
edits
| Line 153: | Line 153: | ||
* [https://www.cygwin.com/ Cygwin] On {{Win}} 檔案總管選定某個資料夾,點選 「傳送到」 -> 「Cygwin」,就可以開啟 Cygwin 視窗,並且自動切換到選定的資料夾<ref>[https://superuser.com/questions/115587/how-do-i-create-a-shortcut-that-opens-cygwin-bash-shell-on-a-directory-of-my-cho How do I create a shortcut that opens Cygwin bash shell on a directory of my choosing (UNC especially)? - Super User]</ref> | * [https://www.cygwin.com/ Cygwin] On {{Win}} 檔案總管選定某個資料夾,點選 「傳送到」 -> 「Cygwin」,就可以開啟 Cygwin 視窗,並且自動切換到選定的資料夾<ref>[https://superuser.com/questions/115587/how-do-i-create-a-shortcut-that-opens-cygwin-bash-shell-on-a-directory-of-my-cho How do I create a shortcut that opens Cygwin bash shell on a directory of my choosing (UNC especially)? - Super User]</ref> | ||
*# Open the explorer on {{Win}} and enter the {{kbd | key=shell:sendto}} to open the folder of shortcuts | *# Open the explorer on {{Win}} and enter the {{kbd | key=shell:sendto}} to open the folder of shortcuts | ||
*# Add a new shortcut {{kbd | key=<nowiki>C:\cygwin64\bin\mintty.exe | *# Add a new shortcut {{kbd | key=<nowiki>C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico C:\cygwin64\bin\bash.exe -l -c "cd \"$0\" ; exec bash"</nowiki>}} it the Cygwin was installed on C drive | ||
* [https://www.cygwin.com/ Cygwin] 在 {{Win}} 中,於檔案總管中選取某個資料夾後,點選「傳送到」->「Cygwin」,即可開啟 Cygwin 視窗,並自動切換至選定的資料夾。<ref>[https://superuser.com/questions/115587/how-do-i-create-a-shortcut-that-opens-cygwin-bash-shell-on-a-directory-of-my-cho How do I create a shortcut that opens Cygwin bash shell on a directory of my choosing (UNC especially)? - Super User]</ref> | * [https://www.cygwin.com/ Cygwin] 在 {{Win}} 中,於檔案總管中選取某個資料夾後,點選「傳送到」->「Cygwin」,即可開啟 Cygwin 視窗,並自動切換至選定的資料夾。<ref>[https://superuser.com/questions/115587/how-do-i-create-a-shortcut-that-opens-cygwin-bash-shell-on-a-directory-of-my-cho How do I create a shortcut that opens Cygwin bash shell on a directory of my choosing (UNC especially)? - Super User]</ref> | ||
*# 在 {{Win}} 中開啟檔案總管,輸入 {{kbd | key=shell | *# 在 {{Win}} 中開啟檔案總管,輸入 {{kbd | key=shell | ||
}} 以打開捷徑資料夾 | }} 以打開捷徑資料夾 | ||
*# 新增一個捷徑 {{kbd | key=<nowiki>C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico C:\cygwin64\bin\bash.exe -l -c "cd "$0" ; exec bash"</nowiki>}} (假設 Cygwin 安裝在 C 槽) | *# 新增一個捷徑 {{kbd | key=<nowiki>C:\cygwin64\bin\mintty.exe -o Locale=UTF-8 -i /Cygwin-Terminal.ico C:\cygwin64\bin\bash.exe -l -c "cd "$0" ; exec bash"</nowiki>}} (假設 Cygwin 安裝在 C 槽) | ||
已知問題: | |||
* 捷徑需要包含「-o Locale=UTF-8」選項,否則顯示的中文檔案內容 (e.g. cat filename.csv),會變成亂碼。 | |||
* 若資料夾名稱包含中文字,捷徑可能無法正常運作。 | |||
* [https://iterm2.com/ iTerm2] On {{Mac}} [https://stackoverflow.com/questions/50370854/is-it-possibile-to-open-iterm-in-current-finder-position macos - is it possibile to open iTerm in current Finder position - Stack Overflow] | * [https://iterm2.com/ iTerm2] On {{Mac}} [https://stackoverflow.com/questions/50370854/is-it-possibile-to-open-iterm-in-current-finder-position macos - is it possibile to open iTerm in current Finder position - Stack Overflow] | ||