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

Dynamic Profile Generator for Windows PowerShell #5482

Open
TBBle opened this issue Apr 23, 2020 · 3 comments
Open

Dynamic Profile Generator for Windows PowerShell #5482

TBBle opened this issue Apr 23, 2020 · 3 comments
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Milestone

Comments

@TBBle
Copy link

TBBle commented Apr 23, 2020

Description of the new feature/enhancement

It'd be nice if the "Windows PowerShell" profile worked like the other profiles, and could be disabled using disabledProfileSources.

This would remove the need to carry a 'hidden' overriding profile per #5459, as disabledProfileSources made possible for the other profile sources.

Proposed technical implementation details (optional)

I guess it just needs new IDynamicProfileGenerator implementation, that replaces (and slurps up?) the existing Windows PowerShell profile if present, which appears to have a fixed GUID ({61c54bbd-c2c6-5271-96e7-009a87ff44bf}), fix the 'pick a default profile' logic, and then remove it from the defaults.json.

If the same thing is done for CMD, then I guess the risk appears of how to handle the case that there are no profiles available, where right now I guess you always have those two profiles, even if somehow they are not usable.

@TBBle TBBle added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Apr 23, 2020
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Apr 23, 2020
@DHowett-MSFT
Copy link
Contributor

DHowett-MSFT commented Apr 23, 2020

Before I get to triaging this for real, just wanted to throw out a comment;

even if somehow they are not usable.

If powershell and cmd are not usable on your machine, you are in a very sorry state. Many things on your system will cease to function. I'm not sure this is a reasonable state to be in. 😄

@DHowett-MSFT
Copy link
Contributor

You know, I thought I hated this. I actually don't think I do, which ... makes me somewhat sad. 😆

My stance was always that Windows PowerShell is a windows inbox application, which means we don't need to produce it with a dynamic profile generator. We wanted there to always be a reasonable default so that it would take real effort to get Terminal into a state where it doesn't have any profiles (suppressing all the generators, hiding them all, etc.).

I dunno. @zadjii-msft, this might actually make sense as part of the powershell generator. We can detect the Windows one, the Core ones, and we can actually include the Windows one in the sorted preferential list. I dunno.

I'm marking this one up for issue-task on the backlog, but it warrants further discussion.

@DHowett-MSFT DHowett-MSFT added Area-Settings Issues related to settings and customizability, for console or terminal Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels May 1, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 1, 2020
@TBBle
Copy link
Author

TBBle commented May 10, 2020

I think the same idea applies to the CMD profile. To me, the big advantage of this is consistency in how you manage profiles, both disabling and for when we get #3818 to support overriding.

The flag for me was that there was necessary clarifying around the behaviour of source in a profile, but that set of rationales and behaviours can't be applied to the two "in-box" shells, even (especially) when you're in the position that those two shells are no longer interesting to be run directly in a terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

3 participants