-
Notifications
You must be signed in to change notification settings - Fork 37.6k
Closed as not planned
Closed as not planned
Copy link
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalitytasksTask system issuesTask system issues
Milestone
Description
tasks.json should support back-ticked strings as values to help with multi-line commands and quote-escaping. This is an alternative to issue #168102 and could go a long way to making Tasks even more powerful.
tasks.json is already not valid JSON since it supports a) comments and b) trailing commas. These are 2 of 3 very useful improvements to JSON for using it as a config file format [1]. Back-ticked strings could allow multi-line strings and require less escaping for bash commands...
{
"label": "cron enable dev",
"type": "shell",
"command": "kubectl patch cronjob cron-blah --type json -p '[{\"op\":\"replace\", \"path\":\"/spec/schedule\", \"value\":\"* * * * *\"}, {\"op\":\"replace\", \"path\":\"/spec/jobTemplate/spec/template/spec/containers/0/imagePullPolicy\", \"value\":\"Always\"}]'"
},vs
{
"label": "cron enable dev",
"type": "shell",
"command": `
kubectl patch cronjob cron-blah --type json -p '[{ \
"op":"replace", \
"path":"/spec/schedule", \
"value":"* * * * *" \
}, {\
"op":"replace", \
"path":"/spec/jobTemplate/spec/template/spec/containers/0/imagePullPolicy", \
"value":"Always" \
}]'`
},
[1] http://www.codedread.com/blog/archives/2022/10/26/3-wishes-for-json/
codedread and johnstonmatt
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalitytasksTask system issuesTask system issues