Skip to content
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

Enable wt to inherit the working directory #3547

Closed
wants to merge 9 commits into from

Conversation

zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented Nov 12, 2019

Summary of the Pull Request

Enable wt to inherit the working directory from the commandline and Explorer.

References

PR Checklist

Detailed Description of the Pull Request / Additional comments

I don't feel totally confident in this change. This changes two scenarios, and the run dialog one I'm not super happy about:

  1. Explorer address bar: wtd -> Results in the Terminal being launched in the current path of explorer.
  2. From a commandline shell: wtd -> Results in the Terminal being launched in the current path of shell.
  3. Windows Search: Win, Term (or anything to get to "Windows Terminal)" -> Results in the Terminal being launched in startingDirectory
  4. Run Dialog: Win+R, wtd -> Results in the Terminal being launched in %USERPROFILE%
  • this is the CWD of the run dialog
  • maybe unexpected?
  1. Windows Search: Win, wtd -> Results in the Terminal being launched in C:\Windows\System32
  • technically, the Start menu is invoking the wtd commandline here.
  • maybe unexpected?

@qqkookie
Copy link

qqkookie commented Nov 14, 2019

How about adding "-d" (no argument) to let wt ignore StartingDirectory entry and start in current working directory of parent process, and "-d~" option to force wt to start in %USERPROFILE% directory?

@zadjii-msft
Copy link
Member Author

Honestly I'm not sure I like this change at all. Especially when you try to reconcile it with #3495. Say we had both PRs merged - how does a user open the terminal in their startingDirectory from the run dialog? wt --actuallyUseStartingDirectory? That's silly.
With commandline args, we could pretty easily solve the "use the CWD" problem with wt -d .. However, we can't solve the run dialog and start menu starting in %userprofile% and c:\windows\system32 (respectively).

@qqkookie I'd take a look at #3495, since that's got a much lengthier, complete proposal for commandline arguments.

@zadjii-msft
Copy link
Member Author

After sitting with this a couple weekends now, I hate it. As mentioned above, it results in unexpected behavior in two cases that work well today, and solving those side-effects of this PR doesn't reconcile well with #3495. I'm going to close this PR, and use arguments proposed in that PR as the definitive answer.

@zadjii-msft zadjii-msft deleted the dev/migrie/f/878-proto branch March 19, 2020 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Starting directory no longer respected
2 participants