.gitconfig not following bash alias for default editor command?

你说的曾经没有我的故事 提交于 2020-01-14 09:47:46

问题


In my .bash_profile, I have the vim command aliased to /Applications/MacVim.app/Contents/MacOS/Vim.

For the following line in my .gitconfig file,

 [core]
        editor = vim

git runs system vim rather than following the alias specified above. If I manually change it to match the complete path of MacVim's Vim command above, it works fine.

Is there any way to make .gitconfig follow the bash alias, rather than having to set the complete MacVim path? (I have all my user config files synchronized across multiple machines, some of which don't run MacVim.)


回答1:


Aliases are shortcuts for an interactive shell; they are not used by other processes. Just specify the exact path you want in .gitconfig; you only have to type it once.



来源:https://stackoverflow.com/questions/37466767/gitconfig-not-following-bash-alias-for-default-editor-command

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!