Несоответствие цветовой схемы терминала Windows между консолями

Я использую Yori CMD и PowerShell Core в новом терминале Windows, и у меня есть настраиваемая цветовая схема в соответствии с документацией терминала Windows. Но цвета на этих двух консолях несовместимы.

Например, в PowerShell Core имя папки отображается белым цветом, а в Yori CMD - фиолетовым.

Ёри

введите описание изображения здесь

Ядро PowerShell

введите описание изображения здесь

Мой файл конфигурации для Windows Terminal

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

"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",

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

"disabledProfileSources": ["Windows.Terminal.Azure"],

// 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.
        "startingDirectory": ".",
        "fontFace":  "Cascadia Code PL",
        "fontSize":  14,
        "colorScheme":  "DraculaPlusCustom",
        "backgroundImage": "F:\\Configurations\\wt_bg.jpg",
        "backgroundImageOpacity": 0.05,
        "backgroundImageStretchMode": "uniformToFill",
        "acrylicOpacity": 0.95,
        "useAcrylic": true,
        "cursorShape": "vintage",
        "cursorHeight": 25
        
    },
    "list":
    [
        {
            // Make changes here to the powershell.exe profile.
            "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
            "name": "Windows PowerShell",
            "commandline": "powershell.exe",
            "hidden": false
        },
        {
            // Make changes here to the cmd.exe profile.
            "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
            "name": "Command Prompt",
            "commandline": "cmd.exe",
            "hidden": false
        },
        {
            "guid":  "{7d04ce37-c00f-43ac-ba47-992cb1393215}",
            "name":  "Yori",
            "tabTitle":  "cmd",
            "commandline":  "C:\\Program Files\\Yori\\yori.exe",
            "icon":  "F:\\Software Projects\\Configurations\\yori.ico"
        },
        {
            "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
            "hidden": false,
            "name": "Ubuntu-20.04",
            "tabTitle":  "Ubuntu 20.04",
            "source": "Windows.Terminal.Wsl"
        },
        {
            "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
            "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": [
    {
        "name": "DraculaPlusCustom",

        "background": "#212121",
        "foreground": "#e6e6e6",

        "black": "#21222C",
        "red": "#FF5555",
        "green": "#50FA7B",
        "yellow": "#ffcb6b",
        "blue": "#82aaff",
        "purple": "#c792ea",
        "cyan": "#8BE9FD",
        "white": "#F8F8F2",
        "brightBlack": "#6b6b6b",
        "brightRed": "#FF6E6E",
        "brightGreen": "#69FF94",
        "brightYellow": "#ffcb6b",
        "brightBlue": "#D6ACFF",
        "brightPurple": "#FF92DF",
        "brightCyan": "#A4FFFF",
        "brightWhite": "#F8F8F2"
    }
],

// Add custom keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about keybindings, visit https://aka.ms/terminal-keybindings
"keybindings":
[
    // 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" }
]

}

Как сделать согласованную цветовую схему между разными консолями в Терминале Windows?


person Bhavesh Jadav    schedule 29.11.2020    source источник


Ответы (1)


Не эксперт по Ёри или Терминалу Windows, но вы можете установить цвет подсказки в Ёри следующим образом:

В папке YoriInit.d создайте такой файл yoriinit.ys1 ($E$[37;1m = белый)

set YORIPROMPT=$E$[37;1m$P$$G_OR_ADMIN_G$

Цвет сбегает здесь http://www.malsmith.net/yori/guide/#color_escapes и информацию о yoriprompt здесь http://www.malsmith.net/yori/guide/#env_yoriprompt

person lintalist    schedule 01.01.2021