-
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
Set working directory when invoked from shell extension #10546
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is correct, but I hope someone else can review the logical correctness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope someone else can review the logical correctness.
blocking for aforementioned logical correctness discussion
So my thinking behind this was that it would make it similar to you running The screenshot below shows the current directory for different launch types:
|
So, this will definitely work... but only for the default configuration of Terminal. It starts to get a little dicey when you use the "New windows open in ... existing instance of terminal" option. Then again, this doesn't make it worse for anyone else; it is just as ambiguous for reused instances as it ever was. 😁 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On account of the thing I said, I'm cool with this. It's not worse than it was, and it is better for our default configuration. We'll have to figure out what to do in general with the cwd when Remoting is on.
Thanks for the contribution! |
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Yeah I see what you mean. The current behaviour (new tabs get the working directory that was used to launch the "parent" terminal window) makes sense from a process hierarchy perspective, but I could understand people wanting something else. If it were to be made configurable I get the impression could be a bit tricky to describe in a clear way! |
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)
🎉 Handy links: |
🎉 Handy links: |
This feature does not work for me. I'm using WT Preview 1.10.1933.0. New tabs don't launch in the directory of the first tab when launching WT from the shell extension. |
Hi @adrianghc, could you open a new issue and provide a copy of your |
Done at #10789. |
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.