2010-08-04 29 views
1

我用這個命令來指定文本編輯器中的一個問題:錯誤:有與編輯的交配-w「

$ git config --global core.editor "mate -w"

如何刪除這個配置,我得到這個錯誤:

error: cannot run mate -w: No such file or directory

或者,我該如何解決這個錯誤呢?

謝謝。

+0

也許爲默認編輯器設置另一個命令? – 2013-03-05 02:47:20

回答

0

我假設你正在嘗試使用TextMate作爲默認編輯器。這個錯誤告訴你,'mate'是運行TextMate的命令行工具,不在路徑上。

您必須將其添加到您的系統路徑。首先你必須找到你的隊友程序;這裏的地方我的是:

[email protected] ~/Desktop/Programming/Minesweeper master$ which mate 
/usr/bin/mate 
[email protected] ~/Desktop/Programming/Minesweeper master$ ls -la /usr/bin/mate 
lrwxr-xr-x 1 root wheel 50 Mar 30 2009 /usr/bin/mate -> /Applications/TextMate.app/Contents/Resources/mate 

所以它在/Applications/TextMate.app/Contents

做一個simlink到/ usr/bin中/伴侶:

ln -s /Applications/TextMate.app/Contents/mate /usr/bin/mate 

現在當你輸入的伴侶在命令行中,您應該啓動一個新的TextMate實例。

1

您是否安裝了隊友殼:

嘗試從終端

ln -s /Applications/TextMate.app/Contents/Resources/mate /usr/bin/mate

運行此作爲其中存儲此設置來看看全球的Git配置文件在:

~/.gitconfig