Skip to content

pickStringRemember: Is it possible to remember a key for each options in an optionGroup ? #108

Description

@axelnxp

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:

{
"version": "2.0.0",
"tasks": [
{
"label": "Test task",
"type": "shell",
"command": "echo options: \"${input:options}, category2 option: ${input:remember_option}\"",
"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": [
["cat1_option1", "cat1_option1_value"],
["cat1_option2", "cat1_option2_value"],
],
},
{
"label": "Category 2",
"minCount": 1,
"maxCount": 1,
"options": [
["cat2_option1", "cat2_option1_value"],
["cat2_option2", "cat2_option2_value"],
],
},
]
}
},
{
"id": "remember_option",
"type": "command",
"command": "extension.commandvariable.remember",
"args": { "key": "category2-option" }
},
]
}

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions