6

My goal is to configure my PowerShell Terminal prompt per Hanselman's instructions here: https://www.hanselman.com/blog/how-to-make-a-pretty-prompt-in-windows-terminal-with-powerline-nerd-fonts-cascadia-code-wsl-and-ohmyposh

It seems I was able to execute the provided instructions. The prompt is rendering as I'd expect in Windows Terminal: windows terminal

But not in the VSCode terminal: vscode terminal

VSCode raised this "problem": vscode schema problem

My VSCode settings.json text is here:

// This file was initially generated by Windows Terminal 1.3.2651.0 // It should still be usable in newer versions, but newer versions might have additional // settings, help text, or changes that you will not see unless you clear this file // and let us generate a new one for you.

// To view the default settings, hold "alt" while clicking on the "Settings" button. // For documentation on these settings, see: https://aka.ms/terminal-documentation

"$schema": "https://aka.ms/terminal-profiles-schema",

"defaultProfile": "***",

// You can add more global application settings here.
// To learn more about global settings, visit https://aka.ms/terminal-global-settings

// If enabled, selections are automatically copied to your clipboard.
"copyOnSelect": false,

// If enabled, formatted data is also copied to your clipboard
"copyFormatting": false,

// A profile specifies a command to execute paired with information about how it should look and feel.
// Each one of them will appear in the 'New Tab' dropdown,
//   and can be invoked from the commandline with `wt.exe -p xxx`
// To learn more about profiles, visit https://aka.ms/terminal-profile-settings
"profiles":
{
    "defaults":
    {
        // Put settings here that you want to apply to all profiles.
        "guid": "***",
        "hidden": false,
        "name": "PowerShell Core",
        "source": "Windows.Terminal.PowershellCore",
        "fontFace": "Cascadia Code PL",
        "terminal.integrated.fontFamily": "Cascadia Code PL"
    },
    "list":
    [
        {
            "guid": "***",
            "hidden": false,
            "name": "PowerShell Core",
            "source": "Windows.Terminal.PowershellCore"
        },
        {
            "guid": "***",
            "hidden": false,
            "name": "Ubuntu",
            "source": "Windows.Terminal.Wsl"
        },
        {
            "guid": "***",
            "name": "Command Prompt",
            "commandline": "cmd.exe",
            "hidden": false
        },
        {
            "guid": "***",
            "hidden": false,
            "name": "Azure Cloud Shell",
            "source": "Windows.Terminal.Azure"
        },
        {
            "guid": "***",
            "hidden": false,
            "name": "PowerShell Core",
            "source": "Windows.Terminal.PowershellCore"
        }
    ]
},

// Add custom color schemes to this array.
// To learn more about color schemes, visit https://aka.ms/terminal-color-schemes
"schemes": [],

// Add custom actions and keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings
"actions":
[
    // Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
    // These two lines additionally bind them to Ctrl+C and Ctrl+V.
    // To learn more about selection, visit https://aka.ms/terminal-selection
    { "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" },
    { "command": "paste", "keys": "ctrl+v" },

    // Press Ctrl+Shift+F to open the search box
    { "command": "find", "keys": "ctrl+shift+f" },

    // Press Alt+Shift+D to open a new pane.
    // - "split": "auto" makes this pane open in the direction that provides the most surface area.
    // - "splitMode": "duplicate" makes the new pane use the focused pane's profile.
    // To learn more about panes, visit https://aka.ms/terminal-panes
    { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" }
]

}

Smithright
  • 61
  • 3
  • I don’t think that “problem” has anything to do with your issue. The “problem” is just in relation to the tool used to validate the config file, JSON Schema. The linked Schema is in the newest form, 2019-09. – Relequestual Nov 14 '20 at 06:59

0 Answers0