-
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
How to safely update Terminal's config file with PSWinTerminal? #7146
Comments
You can see my implementation of PSWinTerminal here I used the available environment variables, and I have some ideas for new variables. Should I open an other issues to cover those? |
@sassdawe Sorry to let this issue languish on our repo for so long. As somebody building on top of Terminal you almost certainly deserve better than that! So, here's the deal. Detecting where the settings areRight now, we're leaving this largely up to chance. The user's settings will be in one of three (or four, if they're a terminal developer) places, and figuring out exactly which one is active is hard. We had a proposal, #4566, that would get us there. We need to have out the discussion in that one on whether we really do think it a good idea. Editing settings safelyThere's another project, MSTerminalSettings, that now uses C# code automatically generated from our settings schema. If it's possible for you to follow our schema in a similar way--I'm not sure what powershell offers in terms of JSON schema support--that would make certain that you're not breaking anything. Otherwise, it's entirely safe to edit the user's settings and re-save them. It's a minor pain because we're "mostly JSON" with the addition of trailing commas and comments... much to the ire of some of the more steadfast JSON supporters in our community. futureWe're actively working to separate our settings model -- serializers and deserializers and all -- out into a separate component library that can operate independent of Terminal. One of our goals is to make it easier for people to edit our settings through a programmatic interface. You can follow the progress of that one in #885/#7141 |
By the way, it's really nice to see folks writing modules that support all the weird stuff we do here. You're very much appreciated 😄 |
Description of the new feature/enhancement
What is the safest way to update Terminal's config file from a command line running inside the Terminal?
I'd like to avoid colliding with your future feature updates.
Proposed technical implementation details (optional)
I published PSWinTerminal into PowerShell Gallery, which implements Get-WTTheme, Show-WTTheme, and Set-WTTheme.
And I'm planning to implement Import-WTTheme / New-WTTheme to extend the available themes.
How should I approach these cmdlets without risking breaking the configuration? Thanks!
The text was updated successfully, but these errors were encountered: