Skip to content

[question/new feature] remember the lable of the last picked item #109

@KUGA2

Description

@KUGA2

Hi,

I use this extension to select options for the conan install command. We select the build type:

        {
            "id": "buildType",
            "type": "command",
            "command": "extension.commandvariable.pickStringRemember",
            "args": {
                "key": "buildType",
                "description": "What build type to use",
                "options": [
                    {
                        "label": "Use previous value",
                        "description": "${remember:buildType}",
                        "value": "${remember:buildType}"
                    },
                    {
                        "label": "RelWithDebInfo",
                        "description": "Optimized build with debug symbols",
                        "value": "-s:h '&:build_type=RelWithDebInfo' -s:h build_type=Release"
                    },
                    {
                        "label": "Debug",
                        "description": "unoptimized build for debugging",
                        "value": "-s:h '&:build_type=Debug' -s:h build_type=Debug"
                    },
                    {
                        "label": "Release",
                        "description": "Optimized build",
                        "value": "-s:h '&:build_type=Release' -s:h build_type=Release"
                    },
                    {
                        "label": "BullseyeCoverage",
                        "description": "Build with coverage instrumentation",
                        "value": "-s:h '&:build_type=BullseyeCoverage' -s:h build_type=Release"
                    }
                ],
                "rememberTransformed": true
            }
        },

When picking again, the selection shows the value. This is a little bit confusing.

Image

I would like that the text shows "Use previous value RelWithDebInfo". Print the label instead of the value.
Is this possible?

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