alias

作者: blurryssky | 来源:发表于2016-04-21 11:02 被阅读32次

alias命令可以让我们用自定义的语句代替其他较长的语句,
包括路径bin或者代码命令

创建.bash_profile

打开终端,输入以下命令

cd 
vim .bash_profile

按照我上一篇文章所讲,按I进入编辑模式
输入如下

alias cm='commit -m'

按下esc,输入:wq回车

生效.bash_profile

source .bash_profile

现在命令git cm 'test'即可代表git commit -m 'test'

相关文章

网友评论

      本文标题:alias

      本文链接:https://www.haomeiwen.com/subject/ftstrttx.html