本篇內(nèi)容主要講解“怎么解決Mac下sublime打不開iTerm2的問題”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強。下面就讓小編來帶大家學習“怎么解決Mac下sublime打不開iTerm2的問題”吧!
創(chuàng)新互聯(lián)公司是專業(yè)的望謨網(wǎng)站建設公司,望謨接單;提供成都網(wǎng)站設計、成都做網(wǎng)站,網(wǎng)頁設計,網(wǎng)站設計,建網(wǎng)站,PHP網(wǎng)站建設等專業(yè)做網(wǎng)站服務;采用PHP框架,可快速的進行望謨網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團隊,希望更多企業(yè)前來合作!
找到terminal>iTerm.sh
編輯iTerm,把如下內(nèi)容替換進去。
#!/bin/bash # Modified following this issue: https://github.com/wbond/sublime_terminal/issues/89 CD_CMD="cd "\\\"$(pwd)\\\"" && clear" if echo "$SHELL" | grep -E "/fish$" &> /dev/null; then CD_CMD="cd "\\\"$(pwd)\\\""; and clear" fi VERSION=$(sw_vers -productVersion) OPEN_IN_TAB=0 while [ "$1" != "" ]; do PARAM="$1" VALUE="$2" case "$PARAM" in --open-in-tab) OPEN_IN_TAB=1 ;; esac shift done if (( $(expr $VERSION '<' 10.7) )); then RUNNING=$(osascript<<END tell application "System Events" count(processes whose name is "iTerm") end tell END ) else RUNNING=1 fi if (( ! $RUNNING )); then osascript<<END tell application "iTerm" tell current window tell current session of (create tab with default profile) write text "$CD_CMD" 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的問題”有了更深的了解,不妨來實際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關內(nèi)容可以進入相關頻道進行查詢,關注我們,繼續(xù)學習!
文章題目:怎么解決Mac下sublime打不開iTerm2的問題
當前路徑:http://chinadenli.net/article26/joicjg.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供企業(yè)建站、做網(wǎng)站、網(wǎng)站收錄、用戶體驗、網(wǎng)站設計、靜態(tài)網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)