-
Notifications
You must be signed in to change notification settings - Fork 11
pickStringRemember: Is it possible to remember a key for each options in an optionGroup ? #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@axelnxp try v1.67.0, look at Example 13 |
@rioj7 thanks ! It works as expected. In fact, my use case evolved and is a bit different that what I described initial in my ticket, I pushed the thing a bit further. I could find a way to do it, here is an example: {
"version": "2.0.0",
"tasks": [
{
"label": "Test task",
"type": "shell",
"command": "echo options: \"${input:options}, category1 option alt value: ${input:remember_altvalue}\"",
"options": {
"cwd": "${workspaceFolder}"
},
},
],
"inputs": [
{
"id": "options",
"type": "command",
"command": "extension.commandvariable.pickStringRemember",
"args": {
"description": "Select options",
"key": "options",
"multiPick": true,
"optionGroups": [
{
"label": "Category 1",
"minCount": 1,
"maxCount": 1,
"options": [
{
"label": "cat1_option1", "value": {
"value": "cat1_option1_value",
"alt_value": "cat1_option1_altvalue",
"__key": "value"
}
},
{
"label": "cat1_option2", "value": {
"value": "cat1_option2_value",
"alt_value": "cat1_option2_altvalue",
"__key": "value"
}
},
],
},
{
"label": "Category 2",
"minCount": 1,
"maxCount": 1,
"options": [
["cat2_option1", "cat2_option1_value"],
["cat2_option2", "cat2_option2_value"],
],
},
]
}
},
{
"id": "remember_altvalue",
"type": "command",
"command": "extension.commandvariable.remember",
"args": { "key": "alt_value" }
},
]
} I don't know if this is the best way to do it, but it works. |
Hi !
I'm trying to figure out if it's possible to associate a key for each category of optionGroups, so I can remember it with
extension.commandvariable.remember
and use as a discrete input.Let me try to give an example:
This obviously doesn't work, there's no link with the key to remember.
So, how can I change this to be able to remember and retrieve the value of one of the option selected in one category ?
The text was updated successfully, but these errors were encountered: