workspaceFolder in a multi-root workspace
The value of ${workspaceFolder} is expanded differently by the extension than how VSCode expands it.
Outside the extension,
It doesn't return the workspace folder the currently active file is in. It returns the workspace folder in which the task is defined https://github.com/Microsoft/vscode/issues/54596#issuecomment-406391812
Personally I find the way VSCode expands it is more useful.
IMO it can also be used for resolving nested ${input} variables
The fact that I do not support the ${input} variable is that I don't know which .json is the source of the command (task, launch, keybindings). https://github.com/rioj7/command-variable/issues/45#issuecomment-1412581498
@dyitzchaki-roku Like the comment from #45, I don't have the information that VSC has, VSC calls my command and I have no clue where it is called from. If you want the workspace folder where the task is defined you should use ${workspaceFolder:name}. Where name is the name of that workspace, as mentioned in the vscode issue 54596
Maybe workspaceFolder should be renamed to fileWorkspaceFolder then
${fileWorkspaceFolder}- the current opened file's workspace folder
https://code.visualstudio.com/docs/editor/variables-reference#_predefined-variables
@dyitzchaki-roku I can add this new variable as a synonym, because I can't supply the behavior of VSC. I might make an educated guess by analyzing all tasks.json and launch.json files and try to find the input entry used. But the simple method is to also name the workspace in the task input var used. What to do with the global defined tasks, they are not part of a workspace.