seunlanlege / vscode-action-buttons

VsCode extension for custom status bar buttons
90 stars 25 forks source link

Feature request: show commands based on existing file #81

Open StefBakker opened 1 year ago

StefBakker commented 1 year ago

Hi!

I would like to see a option to only show a command if a certain file exists. Example with option requires:

{
    "actionButtons": {
        "defaultColor": "#FFF",
        "commands": [
            {
                "name": "Clear Cache",
                "color": "yellow",
                "singleInstance": false,
                "command": "php bin/console cache:clear",
                "requires": "/bin/build.sh"
            },
            {
                "name": "Compile",
                "color": "yellow",
                "singleInstance": false,
                "command": "php bin/console theme:compile",
                "requires": "package.json"
            }
        ]
    }
}

This would be handy for switching multiple projects and not having to setup each project workspace.