-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Windows/tabs created with "wt new-tab COMMAND" start with the title of the default Terminal profile, not the COMMAND name #6776
Comments
So, this one is weird... I'm not sure how we should handle it. I'm not certain setting the commandline to be the title is the right thing to do. A profile is closer to a shell link than an unjacketed command. A traditional console host started from a LNK inherits the stem name of the LNK file, not the commandline string stored inside it. However, there's no true provision for taking a LNK and "running a different command" with it. . . except I'm inclined to call it by design. What do you think? |
Those are all good points you've made. My point of view, though, is that I'm not specifying a profile name on the This could be even more of a problem if and when Hence, I would not be happy with a design of Terminal that incorporates the current behavior. We can certainly try to come up with something that we're both happy with, though. |
I'm moving this back out to "v2.0". We'll do this in tandem with the change for #10669, because doing that all at once is a good story we can sell. They don't really make sense one at a time. ALSO Let's only do this when the |
Right now, we store GUIDs in panes and most of the functions for interacting with profiles on the settings model take GUIDs and look up profiles. This pull request changes how we store and look up profiles to prefer profile objects. Panes store strong references to their originating profiles, which simplifies settings lookup for CloseOnExit and the bell settings. In fact, deleting a pane's profile no longer causes it to forget which CloseOnExit setting applies to it. Duplicating a pane that is hosting a deleted profile (#5047) now duplicates the profile, even though it is otherwise unreachable. This makes the world more consistent and allows us to _eventually_ support panes hosting profiles that do not have GUIDs that can be looked up in the profile list. This is a gateway to #6776 and #10669, and consolidating the profile lookup logic will help with #10952. PR #10588 introduced TerminalSettings::CreateWithProfile and made ...CreateWithProfileByID a thin wrapper over top it, which looked up the profile by GUID before proceeding. It has also been removed, as its last caller is gone. Closes #5047
This was fixed in #10998. Thanks! |
(We took the path of making the title match the first segment of the command, and are decoupling profile choice at the same time. We'll work on pulling icons and stuff out if necessary later. Changing the profile is a breaking change, the rest are new fun features.) |
It was insufficient to only promote commandline components to titles during commandline parsing, because we also have a whole complement of actions that contain NewTerminalArgs. The tests caught me out a little too late (sorry!). I decided it was better move promotion down to TerminalSettings. Fixes #6776.
It was insufficient to only promote commandline components to titles during commandline parsing, because we also have a whole complement of actions that contain NewTerminalArgs. The tests caught me out a little too late (sorry!). I decided it was better move promotion down to TerminalSettings. Fixes #6776 Re-implements #10998
This pull request introduces our first use of the "base" profile as an actual profile. Incoming commandlines from `wt foo` *and* default terminal handoffs will be hosted in the base profile. **THIS IS A BREAKING CHANGE** for user behavior. The original behavior where commandlines were hosted in the "default" profile (in most cases, Windows PowerShell) led to user confusion: "why does cmd use my powershell icon?" and "why does the title say PowerShell?". Making this change unifies the user experience so that we can land commandline detection in #10952. Users who want the original behavior can get it back for commandline invocation by specifying a profile using the `-p` argument, as in `wt -p PowerShell -- cmd`. As a temporary stopgap, users who attempt to duplicate the base profile will get their specified default profile until we land #5047. This feature is hidden behind the same feature flag that controls the visibility of base/"Defaults" in the settings UI. Fixes #10669 Related to #6776
🎉This issue was addressed in #11029, which has now been successfully released as Handy links: |
Environment
Windows build number: Windows 10 ver. 2004 build 19041.329
Windows Terminal version (if applicable): 1.1.1812.0
Steps to reproduce
settings.json
file, causing Terminal to revert to the default settings under which the built-in Windows PowerShell profile for Terminal{61c54bbd-c2c6-5271-96e7-009a87ff44bf}
is the default one.wt.exe C:\Windows\System32\robocopy.exe
Expected behavior
The title of the Terminal tab created is "C:\Windows\System32\robocopy.exe" or similar.
Actual behavior
The title of the Terminal tab created is "Windows PowerShell".
(If you watch Task Manager or another process listing, you can see that no PowerShell process was ever started.)
The text was updated successfully, but these errors were encountered: