terminal: MEGATHREAD: Breaking settings changes in version 0.11!

BREAKING SETTINGS CHANGES IN 0.11

  • BREAKING CHANGE We’ve deleted a lot of legacy settings handling (#5190)
    • Please see our blog post and our most recent status update for more information.
    • If you had settings hanging out in the globals dictionary, you’ll want to move them out.
      • REMEDIATION: move everything from globals to the root of your settings file and delete the empty globals object.
      • Failure to do so will cause us to ignore your default profile, launch mode, etc., etc.
      • THIS INCLUDES defaultProfile
    • requestedTheme has been renamed to theme (#5265)
  • profiles.json has been renamed to settings.json. This should be transparent to you as we’ll rename it on first launch (#5199)
    • As a side effect, we’ll finally stop resurrecting old pre-version-0.3 roaming profiles.
  • If you don’t specify a splitPane split mode, it’ll default to automatic (#5194)
  • copy’s original and poorly-understood trimWhitespace argument is now called singleLine to indicate that it will, in fact, copy text as a single line (#5216)
  • The default font for any profiles that don’t specify a font is now Cascadia Mono (#5121)

Do your settings look like this?

{
    "globals": {
        "defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
        "initialCols": 200,
        "initialRows": 65,
        "initialPosition": "0,0",
        "wordDelimiters" : " ()\"'-:,;<>~!@#$%^&*|+=[]{}~?\u2502",
        "confirmCloseAllTabs": true,
        "keybindings": [
            ...
        ]
    },
    "profiles": {
        ...
    }
}

Then change them to look like this:

{
    "defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
    "initialCols": 200,
    "initialRows": 65,
    "initialPosition": "0,0",
    "wordDelimiters" : " ()\"'-:,;<>~!@#$%^&*|+=[]{}~?\u2502",
    "confirmCloseAllTabs": true,
    "keybindings": [
        ...
    ],
    "profiles": {
        ...
    }
}

Or even better, make a backup of your settings file, and delete the contents entirely. We’ll re-generate the file with some better formatting and more sane defaults, and you can copy the modifications you want back in.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 519
  • Comments: 72 (26 by maintainers)

Commits related to this issue

Most upvoted comments

Out of curiosity, any reason why settings.json’s global values weren’t moved automatically to the root level after the upgrade? You migrate the config on multiple occasions which is good, but not this time.

I myself had this problem and got into #5489 even though I scanned changelog before the upgrade, but haven’t picked up that I have actually to change something in my config :slightly_smiling_face:

Ah, I’m gonna guess that the key bindings that aren’t working are the <kbd>Ctrl+Shift+#</kbd> ones. Sorry our documentation failed you here – those are included in the legacy settings removal from #5190. Right now, I think those old bindings are replacing the default bindings with their no-longer-effective legacy versions and you can just delete them.

Here’s a better way out, though:

Judging by all the key bindings, the format, and the profiles containing every config option, it looks like that settings file predates 0.2. I really think it’s great that you’ve been with us that long (since our first public release!) Thanks! Versions of Terminal after 0.5 lay down a cool new settings template that’s more streamlined, and is a bit better-documented. There’s a set of “default” settings now that live in the terminal package that your settings get applied on top of.

It’s not a requirement by any means, but you might be a bit happier in general if you spend a couple minutes migrating.

  1. move your old settings file aside
  2. let Terminal make a new one (automatic on startup)
  3. copy over key bindings that you care about (since you’re using pre-0.2 settings, you might care that <kbd>Ctrl+W</kbd> and <kbd>Ctrl+T</kbd> are bound to close/open tab (which was a bad decision we made almost a whole year ago).
  4. copy over some profiles you care about.

The settings model change from 0.5 means you don’t need to specify every option in every profile, and you don’t need to be quite so aggressive in customizing everything.

I took a stab at it – this should be equivalent to your old settings, but with a whole bunch of the legacy cruft removed.

https://gist.github.com/DHowett-MSFT/ec2d24cf2b84e1555fb56a1192e4fb94

I didn’t know if you used alt+N for switching tabs, but those were some of the old key bindings in your settings and I didn’t want to go stomp them 😄 A bunch of your “duplicated” settings got moved into the “defaults” group… cuts down on repetitive lines for sure.

If you had settings hanging out in the globals dictionary, you’ll want to move them out. Failure to do so will cause us to ignore your default profile, launch mode, etc., etc. THIS INCLUDES defaultProfile

You might want to reword that from “move them out” as that really doesn’t say nearly enough to anyone. Be specific:

…you will need to move them to the root object of the settings.json.

So upon a fresh install of Terminal the settings.json file contains a bunch of URL references. However, most of them lead nowhere useful. Can these changes be made for the sake of people actually trying these URLs since 1.0 is approaching? 😃

ref URL leads to should be
https://aka.ms/terminal-documentation https://github.com/microsoft/terminal/blob/master/doc/user-docs/index.md https://github.com/microsoft/terminal/blob/master/doc/user-docs/UsingJsonSettings.md
https://aka.ms/terminal-global-settings https://github.com/microsoft/terminal/blob/master/doc/user-docs/index.md https://github.com/microsoft/terminal/blob/master/doc/user-docs/UsingJsonSettings.md#global-settings
https://aka.ms/terminal-profile-settings https://github.com/microsoft/terminal/blob/master/doc/user-docs/index.md https://github.com/microsoft/terminal/blob/master/doc/user-docs/UsingJsonSettings.md#profiles
https://aka.ms/terminal-color-schemes https://github.com/microsoft/terminal/blob/master/doc/user-docs/index.md https://github.com/microsoft/terminal/blob/master/doc/user-docs/UsingJsonSettings.md#color-schemes
https://aka.ms/terminal-keybindings https://github.com/microsoft/terminal/blob/master/doc/user-docs/index.md https://github.com/microsoft/terminal/blob/master/doc/user-docs/UsingJsonSettings.md#key-bindings
https://aka.ms/terminal-selection https://github.com/microsoft/terminal/blob/master/doc/user-docs/index.md https://github.com/microsoft/terminal/blob/master/doc/user-docs/index.md#selecting-and-copying-text-in-windows-terminal
https://aka.ms/terminal-panes https://github.com/microsoft/terminal/blob/master/doc/user-docs/index.md ?

This warning dialog really could have used a direct link to the settings file to make it more seamless to open for editing. Also, a detection of when the only change to the settings file needed to make it valid again was to hoist the stuff from globals up could have been implemented and the settings file auto-patched. Not a big deal overall, but feels like a miss in terms of UX/DX.

switchToTab0switchToTab9 in keybinding were broken

So, if you have never edited your settings in Terminal you might be happier just deleting the contents of that file. If you have, and you want to keep your customizations, you can delete the “globals {“ line and the equivalent “}” at the end of the globals. Check out the “if your file looks like this…” section at the top of the page.

Those links are going to go somewhere useful SoonTM. Please bear with us as we put the finishing touches on the actual docs 😉

From #5611

Wow, if you had colorscheme in your settings file, you must have installed the Terminal an exceptionally long time ago. Thanks for sticking with us for so long through the preview process ❤️!

As you’ve found out, the colorscheme key was deprecated in favor of colorScheme. Largely, we’re tracking all the “upgrade to 0.11 broke my settings” bugs with #5458, so I’m gonna close this thread as a duplicate.

Thanks!


Maybe try changing "hidden": false 🤔 from #5684:

👉 NOTE: On launch, if a dynamic profile generator is enabled, it will always add new profiles it detects to your list of profiles. If you delete a dynamically generated profile from your list of profiles, it will just get re-added the next time the Terminal is launched! To remove a dynamic profile from your list of profiles, make sure to set "hidden": true in the profile.

after this update, my default font was changed and the most importantly I can’t use switchToTab0, switchToTab1... keybindings

I set ctrl+Num to switch tab, but it doesn’t work. Only the default setting, ctrl+alt+Num can switch tabs…

yeah not meaning to sound condescending but its a cli tool for cli competent people, so it makes far more sense to work on the core functionality and cli user features rather than trying to make it easy point and click to make pretty - at least until all the main things are done, upvote for html link handler haha

This warning dialog really could have used a direct link to the settings file to make it more seamless to open for editing. Also, a detection of when the only change to the settings file needed to make it valid again was to hoist the stuff from globals up could have been implemented and the settings file auto-patched. Not a big deal overall, but feels like a miss in terms of UX/DX.

You can also just access it from the Terminal tab down arrow and click settings.

This is the piece that helped me and I wish would be mentioned in the original post. Thank you.

This warning dialog really could have used a direct link to the settings file to make it more seamless to open for editing. Also, a detection of when the only change to the settings file needed to make it valid again was to hoist the stuff from globals up could have been implemented and the settings file auto-patched. Not a big deal overall, but feels like a miss in terms of UX/DX.

You can also just access it from the Terminal tab down arrow and click settings.

after this update, my default font was changed and the most importantly I can’t use switchToTab0, switchToTab1... keybindings

I set ctrl+Num to switch tab, but it doesn’t work. Only the default setting, ctrl+alt+Num can switch tabs…

by ref https://raw.githubusercontent.com/microsoft/terminal/release-0.11/doc/cascadia/profiles.schema.json

following config can start new tab successfully

{
       "command" : {
		"action": "newTab",
		"index": 0
	},
        "keys" : ["ctrl+shift+1"]
},

@TeoTN Sure was - Check this post for more details: https://github.com/microsoft/terminal/issues/3600#issuecomment-608654738

Deprecated Setting Replacement Setting
switchToTab0 - switchToTab8 { "command": { "action": "switchToTab", "index": NUMBER }, "keys": "ctrl+alt+NUMBER" }

@GrayXu you just need to open your settings.json and move all your setting under the globalSettings key to the top level.

I followed UsingJsonSettings.md#key-bindings, and I think I put keybindings under Global Settings.
here is my config:

{
"$schema": "https://aka.ms/terminal-profiles-schema",
...
"keybindings": [
        ...
        {
            "command": "switchToTab0",
            "keys": [
                "ctrl+1"
            ]
        },
        ...
]
...
}

Some keybinding in this config works normally, including nextTab, closePane and so on. But switchToTab0 didn’t work.

Got to say, I found this extremely jarring for a product that that is at GA status. Auto-migrating such things seems a pretty bare minimum for a breaking change release.

Any reason why we haven’t gotten a GUI for changing settings yet?

@tomm1e That’s entirely intentional. We figured that every user didn’t need to see a full copy of every default scheme in their settings file, so we moved them to defaults.json. You can still use the schemes in that file.

What a pain. Appreciate the commenting in the new generated settings.json but a straight copy/paste from the older version doesn’t work. Cannot get color schemes working and now they are forcing you to have an enabled Azure Cloud Shell profile enabled. Comment it out, save, and it pops right back in. image

This looks like an issue in your shell configuration. WT hasn’t changed how it launches WSL, and WSL hasn’t changed how it spawns your shell.

Any reason why my WSL Ubuntu console theme/colors disappeared?

I deleted the settings file but still:

image

I will say that needing to increment the NUMBER value for the “keys” key versus the “index” key, … is a tad strange, however, I suspect there’s a good reason underlying that choice.

There is! We wanted 0-indexed arguments because we’re not monsters, but we also wanted to use <kbd>alt+1</kbd> as “go to the first tab”, because (at least on en-us keyboard layouts) <kbd>1</kbd> is the first number key on the left. This way, the first tab is on the first number key, the second tab is on the second number key, etc.

Off course not.

https://gist.github.com/bmarkovic/485363256672f4be66379c4d9a604c81

Edit: In case someone else comes along with an issue like this, the issue is that A LOT of these settings have changed and are no longer valid. If you are using VS.Code it will respect the new JSON schema, underline the things that are no longer valid, and you will have to refer to:

https://github.com/microsoft/terminal/blob/master/doc/cascadia/SettingsSchema.md

for the format of the new settings.