Frank Monroe
Frank Monroe

Reputation: 1611

VSCode integrated terminal argument: current filename

In VSCode I want to pass the current file name to the integrated terminal There is a setting:

"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",

How can I add the current file name, for example this would be great:

"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe %CurrentFileName%",

Thanks.

Upvotes: 1

Views: 1000

Answers (1)

VonC
VonC

Reputation: 1324757

The shell argument would be in terminal.integrated.shellArgs.powershell

Try and use one of the variables which should be substituted by their actual value

"terminal.integrated.shellArgs.powershell": ["${file}"]

Upvotes: 1

Related Questions