.gitconfig别名函数调用

时间:2011-06-27 22:08:05

标签: git

我在.gitconfig中定义了以下别名:

[alias]
    teamcity = ! tc

tc是我在.bashrc文件中定义的shell函数。出于某种原因,我收到以下错误:

[aafghani-03:~/git/workday amirafghani(master)]$ git teamcity
 tc: tc: command not found

任何人都知道我能做些什么来解决这个问题?我正试图将功能保留在我的.bashrc中 文件,如果可能的话。

1 个答案:

答案 0 :(得分:6)

这样做

git config alias.teamcity '!bash -ic tc'

当在bash启动文件之外定义别名时,这将不起作用。但你清楚地说明它在.bashrc中,所以你很好