Options to manipulate variables in Visual Studio external tools?


Visual Studio provides a number of variables that gives you access to names other settings in the current editor.

https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/ide/managing-external-tools?view=vs-2015#arguments-for-external-tools

These are fine if you want to accept the full values as given, but what if I wanted to get a substring of the variable or maybe change the backslashes in paths to forward slashes?

Are there ways I can modify the variables to use in my commands?

I specifically want to launch Windows Terminal with a tab name using only part of the solution directory path (and not the full path). Doesn’t appear to support shell variable magic (cmd or bash flavors for that matter).

enter image description here

/q /s /c "wt -w VisualStudio nt -d . --title ""$(SolutionDir)"" --suppressApplicationTitle"

Leave a Reply

Your email address will not be published. Required fields are marked *