.gitconfig别名函数调用(.gitconfig alias function call)
我在.gitconfig中定义了以下别名:
[alias] teamcity = ! tctc是我在.bashrc文件中定义的shell函数。 出于某种原因,我收到以下错误:
[aafghani-03:~/git/workday amirafghani(master)]$ git teamcity tc: tc: command not found有谁知道我能做些什么来解决这个问题? 我想尽可能将函数保存在我的.bashrc文件中。
I have defined the following alias in my .gitconfig:
[alias] teamcity = ! tctc is a shell function I defined in my .bashrc file. For some reason, I get the following error:
[aafghani-03:~/git/workday amirafghani(master)]$ git teamcity tc: tc: command not foundAnyone know what I can do to solve this? I'm trying to keep the function in my .bashrc file if possible.
最满意答案
就这样吧
git config alias.teamcity '!bash -ic tc'当别名在bash启动文件之外定义时,这将不起作用。 但你清楚地说明它在.bashrc中,所以你很好
Make it like so
git config alias.teamcity '!bash -ic tc'This won't work when the alias is defined outside the bash startup files. But you clearly state it's in .bashrc, so you're good
更多推荐
发布评论