2014-03-06 81 views
0

安裝OS X Mavericks後,我發現我無法再通過鍵入'subl'從命令行啓動Sublime Text 2。我在網上看了看崇高的文本文檔,並在堆棧溢出,並在這裏創造一個符號鏈接:安裝OS X Mavericks後,Sublime Text 2無法從命令行工作

Christophers-MacBook-Pro-2:bin christopherspears$ pwd 
/usr/local/bin 
Christophers-MacBook-Pro-2:bin christopherspears$ ll 
lrwxr-xr-x 1 christopherspears staff  62 Mar 6 15:24 [email protected] -> /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl 

然後我在.bash_profile文件中看了:

Christophers-MacBook-Pro-2:~ christopherspears$ cat .bash_profile 
export PATH="/usr/local/bin:$PATH" 

# Set your default text editor 
export EDITOR=subl 

好像在/ usr/local/bin目錄在$ PATH:

Christophers-MacBook-Pro-2:~ christopherspears$ echo $PATH 
/usr/local/share/python:/Users/christopherspears/.rbenv/bin:/usr/local/heroku/bin:/usr/local/share/npm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin 

不知道是什麼問題。

回答

0

我從Mac OS X中卸載了Sublime Text 2並安裝了Sublime Text 3(只是想查看測試版)。然後,我創建了一個鏈接在我家目錄(/用戶/ christopherspears /箱):

Christophers-MacBook-Pro-2:bin christopherspears$ la 
total 8 
drwxr-xr-x 3 christopherspears staff 102 Mar 7 18:41 ./ 
drwxr-xr-x+ 57 christopherspears staff 1938 Mar 7 19:00 ../ 
lrwxr-xr-x 1 christopherspears staff 62 Mar 7 18:41 [email protected] -> /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl 

必須創建的 'bin' 目錄下自己。將以下內容添加到我的.bash_profile中:

# Set your default text editor 
export EDITOR='subl -w' 
export PATH="$HOME/bin:$PATH" 
相關問題