json文件 12345678910111213141516171819202122232425262728293031323334{ "version": "2.0.0", "options": { "cwd": "${fileDirname}/build" }, "tasks": [ { "type": "shell", "label": "cmake", "command": "cmake", "args": [ ".." ] }, { "label": "make", "group": { "kind": "build", "isDefault": "true" }, "command": "make -j12", "args": [ ] }, { "label": "Build", "dependsOn":[ "cmake", "make" ] } ]} 1234567891011121314151617181920212223242526{ "version": "2.0.0", "inputs": [ { "type": "promptString", "id": "commitInfo", "description": "输入commit信息", "default": "default information" } ], "tasks": [ { "label": "提交代码", "type": "shell", "command": "./push.sh", "args": [ "${input:commitInfo}"//inputs中的id ], "group": "test", "presentation": { }, "problemMatcher": [] } ]} shell脚本 12345#!/bin/bashgit add .git commit -am $1git push