pucelle / vscode-run-on-save

Run configured shell commands when a file is saved in vscode, and output configured messages on status bar.
https://marketplace.visualstudio.com/items?itemName=pucelle.run-on-save
MIT License
50 stars 11 forks source link

Use project relative path for globMatch #18

Closed karikera closed 3 years ago

karikera commented 3 years ago

How can I use absolute paths from the workspace with globMatch? I want to limit with the specific directory.

I tried like it but failed.


    "runOnSave.commands": [
        {
            "globMatch": "/path/to/files/*.extension",
pucelle commented 3 years ago

If what you want is to match the path that relative to the current workspace directory, try: ${workspaceFolder}/path_relative_to_workspace_folder/xxx

karikera commented 3 years ago

If what you want is to match the path that relative to the current workspace directory, try: ${workspaceFolder}/path_relative_to_workspace_folder/xxx

image it seems match and globMatch don't pass the formatVariables. it does not work.

pucelle commented 3 years ago

You are right, my mistake, I will process it soon.

pucelle commented 3 years ago

Release a small changed version v1.4.3, globMatch supports variable substitutions now, try it.