pucelle/vscode-run-on-save

Support environment variable substitution in command and globMatch

jackwhelpton opened this issue · 1 comments

As described here:

https://code.visualstudio.com/docs/editor/variables-reference#_environment-variables

In my case this is useful so I can monitor changes of files in custom folders without hardcoding any paths:

    "runOnSave.commands": [
        {
            // Match dotfiles
            "globMatch": "${env:XDG_DATA_HOME}/chezmoi/**",
            "command": "cfg apply",
            "runIn": "terminal",
            "runningStatusMessage": "Applying ${fileBasename}",
            "finishStatusMessage": "${fileBasename} applied"
        }
    ],

I've had a first stab at it here: #30

v1.7.0 released and support this.