Skip to content

Suggestion: feature to "rebase" user profiles on top of new defaults.json #42

@DHowett-MSFT

Description

@DHowett-MSFT

0.5 introduced a new base settings file, defaults.json. It's loaded before user settings, and any profiles with matching GUIDs (or GUIDs + sources) have their settings applied on top of any preexisting ones.

A pleasant side effect of that is that anything set in defaults that's set to the same value in the user's settings file can be removed from the user's settings. That'll let Terminal regain control of that setting (for better or for worse.) The user settings emitted by default are a lot smaller thanks to this.

It'd be neat if MSTerminalSettings could look up the location of defaults.json, parse it, and strip out anything from the user settings that matches the default value.

consideration: guid, name, source, hidden

These keys should probably be kept, even if they're the same. name and guid are really helpful for users to identify their profiles (and Terminal uses guid and source as a primary key.)

consideration: globals / root-level settings

We moved to globals because our JSON serializer was being obnoxious and did not allow us to make sure that all global settings were printed at the top of the file. 😄 The new defaults and the new user settings "stub" dispensed with the globals object, but if it's present it'll be preferred over root-level settings.

consideration: dynamic profiles

The preexisting powershell core and WSL profiles have "defaults" that don't exist in any knowable json file; we should totally rectify that. I guess their settings could be stripped out if they matched the cmd profile's settings ... they're close enough.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions