在命令行中,如果我这样做mate <filepath>
,它会在 TextMate 中为我打开正确的文件。
但是当我这样做时:
$ mate -v
open: invalid option -- v
Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-b <bundle identifier>] [-a <application>] [filenames] [--args arguments]
另外,当我这样做时git commit
,我会看到:
$ git commit
error: cannot run mate: No such file or directory
error: There was a problem with the editor 'mate'.
Please supply the message using either -m or -F option.
我的~/.bashprofile
有以下几行:
#Set Textmate as my default editor from the command-line
alias mate='open -a TextMate.app'
export EDITOR="/usr/local/bin/mate -w"
~/.bashrc
只有这个:
alias mate='open -a TextMate.app'
编辑 1
我的~/.gitconfig
包括以下内容:
[user]
name = My Name
email = myemail@address.com
[core]
editor = mate
[github]
user = marcamillion
token = 50e3iuaidsgadjkhwkjegakjhbsdkjb30432 (don't worry, this is fake)
帮助!