我需要设置一个作为命令传递的变量。
例如,命令应该是这样的:
github "Init command"
我必须执行的命令如下所示:
git add. && git commit -m "/TItle" && git push origin master
"Init command"
应该是"/Title"
的位置
发布于 2018-06-08 23:18:16
最简单的方法,IMHO,是创建一个函数:
github() {
# $1 is the (1st) parameter passed to the function
git add . && git commit -m "$1" && git push origin master
}
https://stackoverflow.com/questions/50763657
复制相似问题