Tasks can have input values that prompt the user. When saving I want it to use the default value png rather than prompting.
tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "Generate graphic for currently open file",
"type": "shell",
"command": "curl",
"args": [
"--request", "POST",
"--upload-file", "${file}",
"${config:plantuml.server}/${input:plantUml.outputFormat}",
"--output", "${fileDirname}/${fileBasenameNoExtension}.${input:plantUml.outputFormat}",
],
"problemMatcher": [],
},
],
"inputs": [
{
"id": "plantUml.outputFormat",
"type": "pickString",
"description": "What kind of output format do you want",
"options": [
"png",
"svg",
"txt",
"pdf",
],
"default": "png",
}
]
}
settings.json
{
"plantuml.server": "http://localhost:8080",
"triggerTaskOnSave.tasks": {
"Generate PNG for currently open file": [ // Force `${input:plantUml.outputFormat}` to be "png" here
"*.puml",
"*.uml",
]
}
}
The workaround for now is to duplicate the task and remove the input, but its not very DRY.
Tasks can have input values that prompt the user. When saving I want it to use the default value
pngrather than prompting.tasks.json{ "version": "2.0.0", "tasks": [ { "label": "Generate graphic for currently open file", "type": "shell", "command": "curl", "args": [ "--request", "POST", "--upload-file", "${file}", "${config:plantuml.server}/${input:plantUml.outputFormat}", "--output", "${fileDirname}/${fileBasenameNoExtension}.${input:plantUml.outputFormat}", ], "problemMatcher": [], }, ], "inputs": [ { "id": "plantUml.outputFormat", "type": "pickString", "description": "What kind of output format do you want", "options": [ "png", "svg", "txt", "pdf", ], "default": "png", } ] }settings.json{ "plantuml.server": "http://localhost:8080", "triggerTaskOnSave.tasks": { "Generate PNG for currently open file": [ // Force `${input:plantUml.outputFormat}` to be "png" here "*.puml", "*.uml", ] } }The workaround for now is to duplicate the task and remove the input, but its not very DRY.