本篇内容主要讲解"怎么解决苹果个人计算机下崇高打不开iTerm2的问题",感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习"怎么解决苹果个人计算机下崇高打不开iTerm2的问题"吧!
找到terminaliTerm.sh
编辑iTerm,把如下内容替换进去。
#!/bin/bash
#修改后他的问题:https://github。com/wbond/sublime _ terminal/issues/89
CD_CMD='cd'\\\'$(pwd)\\\ ' '清除'
if echo ' $ SHell ' | grep-E '/fish $ '/dev/null;然后
CD _ CMD=' CD ' \ \ \ ' $(pwd)\ \ \ ' ';'清楚'
船方不负担装货费用
版本=$(sw_vers-productVersion)
OPEN_IN_TAB=0
而['$1!=''];做
PARAM='$1 '
值='$2 '
大小写" $PARAM "
-打开标签)
OPEN_IN_TAB=1
;
环境系统应用中心环境系统应用程序中心
变化
完成的
if(($(expr $ VERSION ' ' 10.7));然后
RUNNING=$(osascriptEND
tellapplication'SystemEvents '
计数(processeswhosenameis ' iTerm ')
endtell
结束
)
其他
RUNNING=1
船方不负担装货费用
if((!$ RONG));然后
osascriptEND
tellapplication'iTerm '
telllcurrentwindow
tellcurrentssiof(createtawithefaultprofile)
writetext'$CD_CMD '
nbsp; end tell
end tell
activate
end tell
END
else
if (( $OPEN_IN_TAB )); then
osascript &>/dev/null <<EOF
tell application "iTerm"
if (count of windows) = 0 then
set theWindow to (create window with default profile)
set theSession to current session of theWindow
else
set theWindow to current window
tell current window
set theTab to create tab with default profile
set theSession to current session of theTab
end tell
end if
tell theSession
write text "$CD_CMD"
end tell
activate
end tell
EOF
else
osascript &>/dev/null <<EOF
tell application "iTerm"
tell (create window with default profile)
tell the current session
write text "$CD_CMD"
end tell
end tell
activate
end tell
EOF
fi
fi
记得这里的用户设置为(Sublime Text -> Preferences -> Package Settings -> Terminal -> Settings-User)
{ "terminal": "iTerm.sh", "parameters": ["open_terminal_project_folder"] }
到此,相信大家对“怎么解决Mac下sublime打不开iTerm2的问题”有了更深的了解,不妨来实际操作一番吧!这里是网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
内容来源网络,如有侵权,联系删除,本文地址:https://www.230890.com/zhan/102064.html