1.安装插件terminal
2.菜单Sublime text -> Preferences -> Browse Packages
3.找到terminal -> Terminal.sh
4.替换粘贴
#!/bin/bash# Modified following this issue: https://github.com/wbond/sublime_terminal/issues/89CD_CMD="cd "\\\"$(pwd)\\\"" && clear"if echo "$SHELL" | grep -E "/fish$" &> /dev/null; then CD_CMD="cd "\\\"$(pwd)\\\""; and clear"fiVERSION=$(sw_vers -productVersion)OPEN_IN_TAB=0while [ "$1" != "" ]; do PARAM="$1" VALUE="$2" case "$PARAM" in --open-in-tab) OPEN_IN_TAB=1 ;; esac shiftdoneif (( $(expr $VERSION '<' 10.7) )); then RUNNING=$(osascript</dev/null < /dev/null <
5.Sublime Text -> Preferences -> Package Settings -> Terminal -> Settings-User
{ "terminal": "Terminal.sh", "parameters": ["open_terminal_project_folder"]}
注:原sublime text 3 iTerm.sh文件代码如下:
#!/bin/bashCD_CMD="cd "\\\"$(pwd)\\\"" && clear"if echo "$SHELL" | grep -E "/fish$" &> /dev/null; then CD_CMD="cd "\\\"$(pwd)\\\""; and clear"fiVERSION=$(sw_vers -productVersion)OPEN_IN_TAB=0while [ "$1" != "" ]; do PARAM="$1" VALUE="$2" case "$PARAM" in --open-in-tab) OPEN_IN_TAB=1 ;; esac shiftdoneif (( $(expr $VERSION '<' 10.7) )); then RUNNING=$(osascript</dev/null < /dev/null <