Wer oft mit Kommandozeilen arbeitet, wird das Programm “Windows Terminal” schätzen. Mit Windows Terminal ist es möglich, mehrere Kommandozeilentools (CLI = Command Line Interface) unter einer gemeinsamen Terminal-Oberfläche zu verwalten.

Windows bietet folgende Befehlszeilen an:

  • PowerShell (englisch)
  • Windows PowerShell (deutsch)
  • Eingabeaufforderung (cmd.exe)
  • Windows-Subsystem für Linux (WSL)
  • Azure Cloud Shell

Während die ersten vier einen Speicherplatz am lokalen PC zeigen, bezieht sich die Azure Cloud Shell auf einen Speicherplatz in der Cloud.

Das folgende Bild zeigt alle diese Kommandozeilentools in derselben Reihenfolge unter der gemeinsamen Oberfläche des Windows Terminals. Zu besseren Unterscheidung wurden die Farben der Tabs geändert.

Windows Terminal mit allen vordefinierten Kommandozeilentools. Angezeigt wird die deutsche Version der PowerShell.
Durch textbasierte Konfigurationsdateien kann man auch andere Anordnungen einstellen:

Azure Cloud Shell

Installation

Praktische Konfiguration

Hier ist die persönliche Konfigurationsdatei von Roman Korecky.

  • Dezente Hintergrundbilder je nach Umgebung
  • Dezente Hintergrundfarbe je nach Umgebung
  • Klassische Eingabeaufforderung im Retro-Look
  • Schriftart Cascadia Code PL

Am besten öffnet man die Settings im Windows-Terminal, was die JSON-Datei am richtigen Ort aufmacht, und kopiert dann den Inhalt meiner Datei einfach hinein.

Die Prompts für PowerShell habe ich mit PowerLine angepasst. Dadurch bekommt man Code-Ligaturen und Git-Prompts wie in den Screenshots. Eine Anleitung dafür findet man unter Windows Terminal Powerline in PowerShell Configuration | Microsoft Docs.

settings.json

// This file was initially generated by Windows Terminal 0.11.1333.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": "{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

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

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

    // 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.
            "fontFace": "Cascadia Code PL",
            "backgroundImageStretchMode": "none",
            "backgroundImageAlignment": "bottomLeft",
            "backgroundImageOpacity": 0.1,
            "useAcrylic": true,
            "acrylicOpacity": 0.9
        },
        "list":
        [
            {
                // Make changes here to the powershell.exe profile.
                "acrylicOpacity": 0.9,
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "colorScheme": "Campbell Powershell",
                "commandline": "powershell.exe",
                "hidden": false,
                "backgroundImage": "https://upload.wikimedia.org/wikipedia/commons/2/2f/PowerShell_5.0_icon.png"
            },
            {
                // Make changes here to the cmd.exe profile.
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "name": "Eingabeaufforderung",
                "commandline": "cmd.exe",
                "hidden": false,
                "closeOnExit": true,
                "colorScheme": "Retro",
                // "cursorColor": "#ffffff",
                "cursorShape": "filledBox",
                "fontSize": 16,
                "padding": "5, 5, 5, 5",
                "fontFace": "PxPlus IBM VGAB",
                "experimental.retroTerminalEffect": true,
                "useAcrylic": false
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure",
                "background": "#225f78",
                "backgroundImage": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a8/Microsoft_Azure_Logo.svg/500px-Microsoft_Azure_Logo.svg.png",
                "backgroundImageOpacity": 0.3
            },
            {
                "backgroundImage": "https://upload.wikimedia.org/wikipedia/commons/a/af/PowerShell_Core_6.0_icon.png",
                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
                "hidden": false,
                "name": "PowerShell",
                "source": "Windows.Terminal.PowershellCore"
            },
            {
                "background": "#173f4f",
                "backgroundImage": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d0/OpenSUSE_Logo.svg/500px-OpenSUSE_Logo.svg.png",
                "guid": "{0110db4a-cf7b-5647-9a03-7232d80cd09e}",
                "hidden": false,
                "name": "openSUSE-Leap-15-1",
                "source": "Windows.Terminal.Wsl"
            },
            {
                "background": "#2C001E",
                "backgroundImage": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/UbuntuCoF.svg/240px-UbuntuCoF.svg.png",
                "backgroundImageOpacity": 0.15,
                "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
                "hidden": false,
                "name": "Ubuntu",
                "source": "Windows.Terminal.Wsl"
            },
            {
                "background": "#2C001E",
                "backgroundImage": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/UbuntuCoF.svg/240px-UbuntuCoF.svg.png",
                "backgroundImageOpacity": 0.15,
                "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
                "hidden": false,
                "name": "Ubuntu-18.04",
                "source": "Windows.Terminal.Wsl"
            }
        ]
    },

    // Add custom color schemes to this array.
    // To learn more about color schemes, visit https://aka.ms/terminal-color-schemes
    "schemes": [
        {
            "name": "Retro",
            "background": "#000000",
            "black": "#00ff00",
            "blue": "#00ff00",
            "brightBlack": "#00ff00",
            "brightBlue": "#00ff00",
            "brightCyan": "#00ff00",
            "brightGreen": "#00ff00",
            "brightPurple": "#00ff00",
            "brightRed": "#00ff00",
            "brightWhite": "#00ff00",
            "brightYellow": "#00ff00",
            "cursorColor": "#00ff00",
            "cyan": "#00ff00",
            "foreground": "#00ff00",
            "green": "#00ff00",
            "purple": "#00ff00",
            "red": "#00ff00",
            "white": "#00ff00",
            "yellow": "#00ff00"
        }
    ],

    // 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" }
    ]
}

Links