Open in Windows Terminal doesn't open in the correct folder when Windows Terminal is already open
See original GitHub issueIssue Type: Bug
To reproduce:
- specify settings
{
"terminal.explorerKind": "external",
"terminal.external.windowsExec": "wt"
}
- add a folder to the workspace (FWIW I used
$HOME/Downloads
) - open Windows Terminal
- right-click a file and choose
Open in Windows Terminal
- a new tab is opened in
C:\Windows\System32
instead of the expected folder ($HOME/Downloads
in this case)
VS Code version: Code - Insiders 1.67.0-insider (a9288be67bab4e9c4dbe62207f01fafc2bdaadcb, 2022-04-15T05:16:11.219Z) OS version: Windows_NT x64 10.0.22000 Restricted Mode: No
Extensions: none
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30422396
pythontb:30258533
pythonvspyt551:30291412
pythonptprofiler:30281269
vsdfh931cf:30280410
vshan820:30294714
pythondataviewer:30285072
vscod805:30301674
pythonvspyt200:30323110
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30404738
wslgetstarted:30449409
pythonvspyt640:30438691
vscscmwlcmt:30465136
pynewfile477:30451556
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Windows Terminal Troubleshooting
Set your WSL distribution to start in the home ~ directory when launched in older versions of Windows Terminal.
Read more >How to open the Windows Terminal (Preview) in File Explorer
Simply type in wt in the address bar and it will open the command prompt with the path to your current folder already...
Read more >A Guide to Customising the Windows Terminal - freshman.tech
Additionally, you can right click on a directory in File Explorer and select “Open in Windows Terminal”. This will launch Windows Terminal ...
Read more >Integrated Terminal in Visual Studio Code
Note: Open an external terminal with the Ctrl+Shift+C keyboard shortcut if ... are similar to file links but will open a new VS...
Read more >Top 5 Ways to Fix Windows Terminal Not Opening on ...
1. Use Alternative Methods to Launch Windows Terminal · 2. Ensure Windows Terminal Is Not Disabled · 3. Repair or Reset the Windows...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay, I know this doesn’t sound like it, but I think we’re tracking this in https://github.com/microsoft/terminal/issues/5506.
That’s the one I’m generally using for “when a commandline is given to an existing window, make sure to evaluate it’s
startingDirectory
relative to the CWD the commandline was already run in”.Hmm okay I see what’s going on here. You’re spawning
wt -d .
inc:\whatever
. When this works, it’s because Terminal is evaluating.
as relative to the Terminal’s own CWD, which isc:\whatever
.If you’ve got
useAnyExisting
set, then that commandline will get handed off to the existing Terminal window. That window probably has a different CWD, so.
won’t work right.I know we’re tracking this in a couple places on our repo, I’ll find them after lunch.