-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Open Windows Terminal here" does not continue to work for subsequent tabs, panes #8933
Comments
Hmm. Looks like we're only applying the "open in Windows Terminal" to the first tab that's created. So I think there's another issue floating around here tracking something similar, but I for the life of me can't find it. For this one, maybe we shouldn't ONLY be doing |
What is the expected behaviour if "Open Windows Terminal here" in some future version opens a new tab in an existing Windows Terminal window (related to #4472 but not necessarily using I think Windows Terminal should resolve |
My workaround to address this (to ensure that new panes/tabs open with the same starting directory) is to do the following:
Demo: |
The last version of Windows Terminal (1.7.1033.0) have the option "Use parent process directory", that I should do what I wanted, but it is not working! Only the first profile open in the directory I choose. But when I create a new profile in a new tab, it opens in the "C:\Windows\system32" directory. |
For me it is not only not working, but also breaks Git Bash:
This is my output from Windows Terminal, from Git Bash, when opened via "Open in Windows Terminal" context menu, then new tab:
When Windows Terminal is opened via Menu Start everything works perfectly. |
@rafrafek That's certainly unexpected, but very weird that your git bash profile would behave so differently if the starting directory was |
@zadjii-msft Yes, sure. It looks like this:
|
I wonder if the |
@KalleOlaviNiemitalo It is 1.7.1033.0 installed from GitHub releases. |
@rafrafek, in the Git Bash session in which |
@KalleOlaviNiemitalo Yes!
Good session opened via Menu Start:
Where |
OK, I can reproduce on Windows 10 build 19042.928 if I define "HOME" = REG_EXPAND_SZ "%HOMEDRIVE%%HOMEPATH%" as a user environment variable like so:
The incorrect value of the environment variable thus shows up both in the original tab and the subsequently opened tab. Also, this happens even if settings.json does not specify "startingDirectory" at all. Therefore, I think the problem with Process Monitor shows that the According to #9741 (comment), Windows loads |
Sets the working directory of the terminal when invoked from the shell extension. This ensures that new tabs opened with a starting directory of `.` open in the directory that the terminal was invoked from. Closes #8933 ## Validation Steps Performed Manually tested - default PowerShell profile set to use home directory, Windows PowerShell profile set to use current directory. Launched via the shell extension and the default profile opened in the explorer directory, as did a new Windows PowerShell tab.
Sets the working directory of the terminal when invoked from the shell extension. This ensures that new tabs opened with a starting directory of `.` open in the directory that the terminal was invoked from. Closes #8933 ## Validation Steps Performed Manually tested - default PowerShell profile set to use home directory, Windows PowerShell profile set to use current directory. Launched via the shell extension and the default profile opened in the explorer directory, as did a new Windows PowerShell tab. (cherry picked from commit f152573)
🎉This issue was addressed in #10546, which has now been successfully released as Handy links: |
🎉This issue was addressed in #10546, which has now been successfully released as Handy links: |
Environment
Steps to reproduce
Else, I have been add
startingDirectory
in setting:Expected behavior
For example, I click "Open Windows Terminal here" in



D:\Games
.What I think it should be:
Actual behavior
My default tab is Powershell7, it works well:



But if I switch to WSL or CMD:
the path goes to
C:\Windows\system32
.Other
I now use this for me:
It works as my expect. But the new feature "Open Windows Terminal here" does not.
The text was updated successfully, but these errors were encountered: