windows:windows_terminal

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
windows:windows_terminal [2019/08/19 07:26] ともやんwindows:windows_terminal [2023/09/20 18:15] (現在) – [settings.json の設定例] ともやん
行 1: 行 1:
-<html> 
-  <style> 
-    #result pre { 
-      height: 200px; 
-      overflow: scroll; 
-      overflow-x: hidden; 
-    } 
-  </style> 
-</html> 
 ====== Windows Terminal ====== ====== Windows Terminal ======
 Windows Terminal は Windows 10 向けの新しいコマンドプロンプトを提供する。Linux ターミナルのようにマルチタブなどの機能も提供されている。\\ Windows Terminal は Windows 10 向けの新しいコマンドプロンプトを提供する。Linux ターミナルのようにマルチタブなどの機能も提供されている。\\
-2019/08/13 現在のバージョンは **Windows Terminal (Preview) Version: 0.3.2171.0** である。\\+2020/05/14 現在のバージョンは **Windows Terminal Version: 0.11.1333.0 (1.0RC2)** である。\\
 [[https://www.microsoft.com/ja-jp/p/windows-terminal-preview/9n0dx20hk701?rtc=1&activetab=pivot%3Aoverviewtab|Microsoft Store]] からインストールできる。\\ [[https://www.microsoft.com/ja-jp/p/windows-terminal-preview/9n0dx20hk701?rtc=1&activetab=pivot%3Aoverviewtab|Microsoft Store]] からインストールできる。\\
 \\ \\
行 16: 行 7:
 ソースコード: [[https://github.com/microsoft/terminal|GitHub - microsoft/terminal: The new Windows Terminal, and the original Windows console host -- all in the same place!]]\\ ソースコード: [[https://github.com/microsoft/terminal|GitHub - microsoft/terminal: The new Windows Terminal, and the original Windows console host -- all in the same place!]]\\
 \\ \\
-{{:windows:windows_terminal.png?800|Windows Terminal}}\\+{{windows:windows_terminal.png?470|Windows Terminal}}\\ 
 + 
 +===== システム必要条件 ===== 
 +Windows Terminal requires Windows 10 1903 (build 18362) 以降\\ 
 +[[windows:version_build_info|Windows Version Build 情報]]\\ 
 +<code powershell> 
 +$ cmd /c ver 
 +</code> 
 +<WRAP prewrap 100% #result> 
 +<code powershell> 
 +Microsoft Windows [Version 10.0.18363.836] 
 +</code> 
 +</WRAP> 
 +OS バージョンを更新しないとインストールできないようである。\\ 
 +{{windows:windows_terminal_os_spec.png?800|Microsofe Store}}\\ 
 + 
 +===== インストール ===== 
 +[[windows:scoop|Scoop]] によるインストール\\ 
 +<code powershell> 
 +$ scoop bucket add dorado https://github.com/h404bi/dorado 
 +</code> 
 +<WRAP prewrap 100% #result> 
 +<code> 
 +Checking repo... ok 
 +The dorado bucket was added successfully. 
 +</code> 
 +</WRAP> 
 + 
 +<WRAP prewrap 100%> 
 +<code powershell> 
 +$ sudo scoop install windowsterminal-np --global 
 +</code> 
 +</WRAP> 
 +<WRAP prewrap 100% #result> 
 +<code> 
 +Installing 'windowsterminal-np' (0.11.1333.0) [64bit] 
 +Microsoft.WindowsTerminal_0.11.1333.0_8wekyb3d8bbwe.msixbundle (18.2 MB) [====================================] 100% 
 +Checking hash of Microsoft.WindowsTerminal_0.11.1333.0_8wekyb3d8bbwe.msixbundle ... ok. 
 +Running installer script... 
 +Linking C:\ProgramData\scoop\apps\windowsterminal-np\current => C:\ProgramData\scoop\apps\windowsterminal-np\0.11.1333.0 
 +'windowsterminal-np' (0.11.1333.0) was installed successfully! 
 +</code> 
 +</WRAP>
  
 +**Microsoft Store** よりインストールする場合\\
 +[[https://aka.ms/windowsterminal|Microsoft Store - Windows Terminal]]\\
 ===== コピー & ペースト ===== ===== コピー & ペースト =====
 <code> <code>
行 28: 行 63:
 ===== 設定 ===== ===== 設定 =====
 Windows Terminal の設定はタブのドロップダウンから **Settings** を選択して **json ファイル**を編集する。\\ Windows Terminal の設定はタブのドロップダウンから **Settings** を選択して **json ファイル**を編集する。\\
-{{:windows:windows_terminal_settings.png?284|Windows Terminal Settings}}\\+<WRAP prewrap 100%> 
 +ファイルパス: <html><code>%USERPROFILE%\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json</code> 
 +</html> 
 +</WRAP> 
 +{{windows:windows_terminal_settings.png?284|Windows Terminal Settings}}\\ 
 + 
 +==== settings.json のセクション構成 ==== 
 +<WRAP prewrap 100% #mintbl> 
 +^  セクション  ^  補足 
 +| グローバル設定\\ (Global Settings - start)  | <code javascript>{</code>
 +| +- プロファイル\\ (Profiles)  | <code javascript>    "profiles": 
 +    { 
 +    ... 
 +    },</code> 
 +| +- 配色\\ (Color Schemes)  | <code javascript>    "schemes": [],</code> 
 +| +- キーバインド\\ (Key Bindings)  | <code javascript>    "keybindings": 
 +    [ 
 +    ... 
 +    ]</code> 
 +| グローバル設定\\ (Global Settings - end)  | <code javascript>}</code>
 +</WRAP> 
 + 
 +==== settings.json の設定例 ==== 
 +<WRAP prewrap 100% #mincode> 
 +<file javascript settings.json> 
 +// This file was initially generated by Windows Terminal 0.11.1251.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}", 
 +     
 +    "initialCols": 120, 
 +    "initialRows": 35, 
 +     
 +    // 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 
 +            "backgroundImage": "C:\\Users\\tomoyan\\Pictures\\mg_chara.png", 
 +            "backgroundImageStretchMode": "none", 
 +            "backgroundImageAlignment": "bottomRight", 
 +            "backgroundImageOpacity": 0.5, 
 +            "font":  
 +            { 
 +                "face": "HackGenNerd Console", 
 +                "size": 8.0 
 +            }, 
 +            "opacity": 90, 
 +            "useAcrylic": false, 
 +            "colorScheme": "Campbell Powershell2", 
 +            "historySize": 10240, 
 +             
 +            //"colorScheme": "Campbell" 
 +            //"colorScheme": "Campbell Powershell" 
 +            //"colorScheme": "Vintage" 
 +            //"colorScheme": "One Half Dark" 
 +            //"colorScheme": "One Half Light" 
 +            //"colorScheme": "Solarized Dark" 
 +            //"colorScheme": "Solarized Light" 
 +        }, 
 +        "list": 
 +        [ 
 +            { 
 +                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", 
 +                "hidden": false, 
 +                "name": "PowerShell Core", 
 +                //"source": "Windows.Terminal.PowershellCore", 
 +                "commandline": "%USERPROFILE%\\scoop\\apps\\powershell\\current\\pwsh.exe", 
 +                "icon": "%USERPROFILE%\\scoop\\apps\\powershell\\current\\assets\\Powershell_av_colors.ico", 
 +                "colorScheme": "Campbell", 
 +                "startingDirectory" : "%USERPROFILE%" 
 +            }, 
 +            { 
 +                // Make changes here to the powershell.exe profile 
 +                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", 
 +                "hidden": false, 
 +                "name": "Windows PowerShell", 
 +                "commandline": "powershell.exe", 
 +                "startingDirectory" : "%USERPROFILE%" 
 +            }, 
 +            { 
 +                // Make changes here to the cmd.exe profile 
 +                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", 
 +                "hidden": false, 
 +                "name": "コマンドプロンプト", 
 +                "commandline": "cmd.exe", 
 +                "colorScheme": "One Half Dark", 
 +                "startingDirectory" : "%USERPROFILE%" 
 +            }, 
 +            { 
 +                "guid": "{d3f31bee-5823-5ed8-8e04-f31ed54f2cd9}", 
 +                "hidden": false, 
 +                "name": "FedoraRemix", 
 +                "source": "Windows.Terminal.Wsl" 
 +            }, 
 +            { 
 +                "guid": "{aa8efdb5-3cbe-50b2-a332-9203dc1ee217}", 
 +                "hidden": false, 
 +                "name": "Fedora", 
 +                "source": "Windows.Terminal.Wsl" 
 +            }, 
 +            { 
 +                "guid": "{8f5a3735-826f-59b7-9b09-6584f5cdcfc6}", 
 +                "hidden": false, 
 +                "name": "Fedora-WSL1", 
 +                "source": "Windows.Terminal.Wsl" 
 +            }, 
 +            { 
 +                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", 
 +                "hidden": false, 
 +                "name": "Azure Cloud Shell", 
 +                "source": "Windows.Terminal.Azure" 
 +            } 
 +        ] 
 +    }, 
 + 
 +    // Add custom color schemes to this array. 
 +    // To learn more about color schemes, visit https://aka.ms/terminal-color-schemes 
 +    "schemes": 
 +    [ 
 +        { 
 +            "name" : "Campbell", 
 + 
 +            "cursorColor": "#FFFFFF", 
 +            "selectionBackground": "#FFFFFF", 
 + 
 +            "background" : "#0C0C0C", 
 +            "foreground" : "#CCCCCC", 
 + 
 +            "black" : "#0C0C0C", 
 +            "blue" : "#0037DA", 
 +            "cyan" : "#3A96DD", 
 +            "green" : "#13A10E", 
 +            "purple" : "#881798", 
 +            "red" : "#C50F1F", 
 +            "white" : "#CCCCCC", 
 +            "yellow" : "#C19C00", 
 +            "brightBlack" : "#767676", 
 +            "brightBlue" : "#3B78FF", 
 +            "brightCyan" : "#61D6D6", 
 +            "brightGreen" : "#16C60C", 
 +            "brightPurple" : "#B4009E", 
 +            "brightRed" : "#E74856", 
 +            "brightWhite" : "#F2F2F2", 
 +            "brightYellow" : "#F9F1A5" 
 +        }, 
 +        { 
 +            "background": "#101050", 
 +            "black": "#0C0C0C", 
 +            "blue": "#0037DA", 
 +            "brightBlack": "#767676", 
 +            "brightBlue": "#3B78FF", 
 +            "brightCyan": "#61D6D6", 
 +            "brightGreen": "#16C60C", 
 +            "brightPurple": "#B4009E", 
 +            "brightRed": "#E74856", 
 +            "brightWhite": "#F2F2F2", 
 +            "brightYellow": "#F9F1A5", 
 +            "cursorColor": "#FFFFFF", 
 +            "cyan": "#3A96DD", 
 +            "foreground": "#CCCCCC", 
 +            "green": "#13A10E", 
 +            "name": "Campbell Powershell2", 
 +            "purple": "#881798", 
 +            "red": "#C50F1F", 
 +            "selectionBackground": "#FFFFFF", 
 +            "white": "#CCCCCC", 
 +            "yellow": "#C19C00" 
 +        }, 
 +        { 
 +            "background": "#012456", 
 +            "black": "#0C0C0C", 
 +            "blue": "#0037DA", 
 +            "brightBlack": "#767676", 
 +            "brightBlue": "#3B78FF", 
 +            "brightCyan": "#61D6D6", 
 +            "brightGreen": "#16C60C", 
 +            "brightPurple": "#B4009E", 
 +            "brightRed": "#E74856", 
 +            "brightWhite": "#F2F2F2", 
 +            "brightYellow": "#F9F1A5", 
 +            "cursorColor": "#FFFFFF", 
 +            "cyan": "#3A96DD", 
 +            "foreground": "#CCCCCC", 
 +            "green": "#13A10E", 
 +            "name": "Campbell Powershell", 
 +            "purple": "#881798", 
 +            "red": "#C50F1F", 
 +            "selectionBackground": "#FFFFFF", 
 +            "white": "#CCCCCC", 
 +            "yellow": "#C19C00" 
 +        }, 
 +        { 
 +            "background": "#282C34", 
 +            "black": "#282C34", 
 +            "blue": "#61AFEF", 
 +            "brightBlack": "#5A6374", 
 +            "brightBlue": "#61AFEF", 
 +            "brightCyan": "#56B6C2", 
 +            "brightGreen": "#98C379", 
 +            "brightPurple": "#C678DD", 
 +            "brightRed": "#E06C75", 
 +            "brightWhite": "#DCDFE4", 
 +            "brightYellow": "#E5C07B", 
 +            "cursorColor": "#FFFFFF", 
 +            "cyan": "#56B6C2", 
 +            "foreground": "#DCDFE4", 
 +            "green": "#98C379", 
 +            "name": "One Half Dark", 
 +            "purple": "#C678DD", 
 +            "red": "#E06C75", 
 +            "selectionBackground": "#FFFFFF", 
 +            "white": "#DCDFE4", 
 +            "yellow": "#E5C07B" 
 +        }, 
 +        { 
 +            "background": "#FAFAFA", 
 +            "black": "#383A42", 
 +            "blue": "#0184BC", 
 +            "brightBlack": "#4F525D", 
 +            "brightBlue": "#61AFEF", 
 +            "brightCyan": "#56B5C1", 
 +            "brightGreen": "#98C379", 
 +            "brightPurple": "#C577DD", 
 +            "brightRed": "#DF6C75", 
 +            "brightWhite": "#FFFFFF", 
 +            "brightYellow": "#E4C07A", 
 +            "cursorColor": "#4F525D", 
 +            "cyan": "#0997B3", 
 +            "foreground": "#383A42", 
 +            "green": "#50A14F", 
 +            "name": "One Half Light", 
 +            "purple": "#A626A4", 
 +            "red": "#E45649", 
 +            "selectionBackground": "#FFFFFF", 
 +            "white": "#FAFAFA", 
 +            "yellow": "#C18301" 
 +        }, 
 +        { 
 +            "background": "#002B36", 
 +            "black": "#002B36", 
 +            "blue": "#268BD2", 
 +            "brightBlack": "#073642", 
 +            "brightBlue": "#839496", 
 +            "brightCyan": "#93A1A1", 
 +            "brightGreen": "#586E75", 
 +            "brightPurple": "#6C71C4", 
 +            "brightRed": "#CB4B16", 
 +            "brightWhite": "#FDF6E3", 
 +            "brightYellow": "#657B83", 
 +            "cursorColor": "#FFFFFF", 
 +            "cyan": "#2AA198", 
 +            "foreground": "#839496", 
 +            "green": "#859900", 
 +            "name": "Solarized Dark", 
 +            "purple": "#D33682", 
 +            "red": "#DC322F", 
 +            "selectionBackground": "#FFFFFF", 
 +            "white": "#EEE8D5", 
 +            "yellow": "#B58900" 
 +        }, 
 +        { 
 +            "background": "#FDF6E3", 
 +            "black": "#002B36", 
 +            "blue": "#268BD2", 
 +            "brightBlack": "#073642", 
 +            "brightBlue": "#839496", 
 +            "brightCyan": "#93A1A1", 
 +            "brightGreen": "#586E75", 
 +            "brightPurple": "#6C71C4", 
 +            "brightRed": "#CB4B16", 
 +            "brightWhite": "#FDF6E3", 
 +            "brightYellow": "#657B83", 
 +            "cursorColor": "#002B36", 
 +            "cyan": "#2AA198", 
 +            "foreground": "#657B83", 
 +            "green": "#859900", 
 +            "name": "Solarized Light", 
 +            "purple": "#D33682", 
 +            "red": "#DC322F", 
 +            "selectionBackground": "#FFFFFF", 
 +            "white": "#EEE8D5", 
 +            "yellow": "#B58900" 
 +        }, 
 +        { 
 +            "background": "#000000", 
 +            "black": "#000000", 
 +            "blue": "#3465A4", 
 +            "brightBlack": "#555753", 
 +            "brightBlue": "#729FCF", 
 +            "brightCyan": "#34E2E2", 
 +            "brightGreen": "#8AE234", 
 +            "brightPurple": "#AD7FA8", 
 +            "brightRed": "#EF2929", 
 +            "brightWhite": "#EEEEEC", 
 +            "brightYellow": "#FCE94F", 
 +            "cursorColor": "#FFFFFF", 
 +            "cyan": "#06989A", 
 +            "foreground": "#D3D7CF", 
 +            "green": "#4E9A06", 
 +            "name": "Tango Dark", 
 +            "purple": "#75507B", 
 +            "red": "#CC0000", 
 +            "selectionBackground": "#FFFFFF", 
 +            "white": "#D3D7CF", 
 +            "yellow": "#C4A000" 
 +        }, 
 +        { 
 +            "background": "#FFFFFF", 
 +            "black": "#000000", 
 +            "blue": "#3465A4", 
 +            "brightBlack": "#555753", 
 +            "brightBlue": "#729FCF", 
 +            "brightCyan": "#34E2E2", 
 +            "brightGreen": "#8AE234", 
 +            "brightPurple": "#AD7FA8", 
 +            "brightRed": "#EF2929", 
 +            "brightWhite": "#EEEEEC", 
 +            "brightYellow": "#FCE94F", 
 +            "cursorColor": "#000000", 
 +            "cyan": "#06989A", 
 +            "foreground": "#555753", 
 +            "green": "#4E9A06", 
 +            "name": "Tango Light", 
 +            "purple": "#75507B", 
 +            "red": "#CC0000", 
 +            "selectionBackground": "#FFFFFF", 
 +            "white": "#D3D7CF", 
 +            "yellow": "#C4A000" 
 +        }, 
 +        { 
 +            "background": "#000000", 
 +            "black": "#000000", 
 +            "blue": "#000080", 
 +            "brightBlack": "#808080", 
 +            "brightBlue": "#0000FF", 
 +            "brightCyan": "#00FFFF", 
 +            "brightGreen": "#00FF00", 
 +            "brightPurple": "#FF00FF", 
 +            "brightRed": "#FF0000", 
 +            "brightWhite": "#FFFFFF", 
 +            "brightYellow": "#FFFF00", 
 +            "cursorColor": "#FFFFFF", 
 +            "cyan": "#008080", 
 +            "foreground": "#C0C0C0", 
 +            "green": "#008000", 
 +            "name": "Vintage", 
 +            "purple": "#800080", 
 +            "red": "#800000", 
 +            "selectionBackground": "#FFFFFF", 
 +            "white": "#C0C0C0", 
 +            "yellow": "#808000" 
 +        } 
 +    ], 
 +     "themes":  
 +    [ 
 +        { 
 +            "name": "legacyDark", 
 +            "tab":  
 +            { 
 +                "background": null, 
 +                "showCloseButton": "always", 
 +                "unfocusedBackground": null 
 +            }, 
 +            "window":  
 +            { 
 +                "applicationTheme": "dark", 
 +                "useMica": false 
 +            } 
 +        }, 
 +        { 
 +            "name": "legacyLight", 
 +            "tab":  
 +            { 
 +                "background": null, 
 +                "showCloseButton": "always", 
 +                "unfocusedBackground": null 
 +            }, 
 +            "window":  
 +            { 
 +                "applicationTheme": "light", 
 +                "useMica": false 
 +            } 
 +        }, 
 +        { 
 +            "name": "legacySystem", 
 +            "tab":  
 +            { 
 +                "background": null, 
 +                "showCloseButton": "always", 
 +                "unfocusedBackground": null 
 +            }, 
 +            "window":  
 +            { 
 +                "applicationTheme": "system", 
 +                "useMica": false 
 +            } 
 +        } 
 +    ], 
 + 
 +    // 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"
 +    ] 
 +
 +</file> 
 +</WRAP> 
 +※**backgroundImage** は 400 x 300px の png 画像を使用。\\ 
 + 
 +==== WSL の レジストリ設定を一覧表示する ==== 
 +**Get-ChildItem** コマンドレットでレジストリを調べる。\\ 
 +<WRAP prewrap 100%> 
 +<code powershell> 
 +$ Get-ChildItem -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss 
 +</code> 
 +</WRAP> 
 +<WRAP prewrap 100% #result> 
 +<code powershell> 
 + 
 +    Hive: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss 
 + 
 +Name                           Property 
 +----                           -------- 
 +{874A2A70-6EAF-42C1-A6F6-1C2EA DistributionName   : FedoraRemix 
 +C2BFA52}                       BasePath           : C:\wsl\FedoraRemix 
 +                               State              : 1 
 +                               Version            : 2 
 +                               DefaultEnvironment : {HOSTTYPE=x86_64, LANG=en_US.UTF-8, PATH=/usr/local/sbin:/usr/loc 
 +                               al/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games, TERM=xterm-256color} 
 +                               DefaultUid         : 1000 
 +                               KernelCommandLine  : BOOT_IMAGE=/kernel init=/init ro 
 +                               Flags              : 15 
 +{CC54D096-DBCD-4D93-93A5-899AE DistributionName   : Fedora-WSL1 
 +35559B4}                       BasePath           : C:\wsl\Fedora-WSL1 
 +                               State              : 1 
 +                               Version            : 2 
 +                               DefaultEnvironment : {HOSTTYPE=x86_64, LANG=en_US.UTF-8, PATH=/usr/local/sbin:/usr/loc 
 +                               al/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games, TERM=xterm-256color} 
 +                               DefaultUid         : 0 
 +                               KernelCommandLine  : BOOT_IMAGE=/kernel init=/init ro 
 +                               Flags              : 7 
 +{E74B61AB-F675-4518-A0E3-BCEE9 DistributionName   : Fedora 
 +C7F8E9C}                       BasePath           : C:\wsl\Fedora 
 +                               State              : 1 
 +                               Version            : 2 
 +                               DefaultEnvironment : {HOSTTYPE=x86_64, LANG=en_US.UTF-8, PATH=/usr/local/sbin:/usr/loc 
 +                               al/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games, TERM=xterm-256color} 
 +                               DefaultUid         : 1000 
 +                               KernelCommandLine  : BOOT_IMAGE=/kernel init=/init ro 
 +                               Flags              : 15 
 +{F9260EF7-5866-4DAC-8E4F-86487 DistributionName   : Fedora32 
 +1004DA4}                       BasePath           : C:\wsl\Fedora32 
 +                               State              : 1 
 +                               Version            : 2 
 +                               DefaultEnvironment : {HOSTTYPE=x86_64, LANG=en_US.UTF-8, PATH=/usr/local/sbin:/usr/loc 
 +                               al/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games, TERM=xterm-256color} 
 +                               DefaultUid         : 0 
 +                               KernelCommandLine  : BOOT_IMAGE=/kernel init=/init ro 
 +                               Flags              : 15 
 +</code> 
 +</WRAP>
  
 ==== MSYS2 MinGW 64-bit を追加する ==== ==== MSYS2 MinGW 64-bit を追加する ====
行 40: 行 571:
 </code> </code>
 生成した **GUID** を使用して **profiles** を以下の様にすると **MSYS2 MinGW 64-bit** が上手く**タブ**になる。\\ 生成した **GUID** を使用して **profiles** を以下の様にすると **MSYS2 MinGW 64-bit** が上手く**タブ**になる。\\
 +<WRAP prewrap 100% #mincode>
 <file javascript profile.json> <file javascript profile.json>
 { {
行 64: 行 596:
         },         },
 </file> </file>
 +</WRAP>
 {{:windows:windows_terminal_msys2.png?800|Windows Terminal MSYS2}}\\ {{:windows:windows_terminal_msys2.png?800|Windows Terminal MSYS2}}\\
  
行 71: 行 604:
 === 失敗例 === === 失敗例 ===
 生成した **GUID** を使用して **profiles** を以下の様に追加してみたが、**MSYS2 MinGW 64-bit** は起動できるものの**タブ**にはならなかった。(別窓になってしまう)\\ 生成した **GUID** を使用して **profiles** を以下の様に追加してみたが、**MSYS2 MinGW 64-bit** は起動できるものの**タブ**にはならなかった。(別窓になってしまう)\\
 +<WRAP prewrap 100% #mincode>
 <file javascript profile.json> <file javascript profile.json>
 { {
行 95: 行 629:
         },         },
 </file> </file>
 +</WRAP>
  
-==== デフォルトで起動するターミナルを **PowerShell** から **コマンドプロンプト(cmd)** に変更する ====+デフォルトで起動するターミナルを **PowerShell** から **コマンドプロンプト(cmd)** に変更する場合\\
 **defaultProfile** に **profiles** の **guid** を設定すると変更できる。\\ **defaultProfile** に **profiles** の **guid** を設定すると変更できる。\\
 +<WRAP prewrap 100% #mincode>
 <code javascript> <code javascript>
 "profiles" : "profiles" :
行 117: 行 653:
 ],         ],        
 </code> </code>
 +</WRAP>
 +
 **defaultProfile** を **{61c54bbd-c2c6-5271-96e7-009a87ff44bf}**(Windows PowerShell) から **{0caa0dad-35be-5f56-a8ff-afceeeaa6101}**(cmd) に変更する。\\ **defaultProfile** を **{61c54bbd-c2c6-5271-96e7-009a87ff44bf}**(Windows PowerShell) から **{0caa0dad-35be-5f56-a8ff-afceeeaa6101}**(cmd) に変更する。\\
 +<WRAP prewrap 100% #mincode>
 <file javascript profile.json> <file javascript profile.json>
 { {
行 136: 行 675:
             },             },
 </file> </file>
 +</WRAP>
  
 +===== トラブルシューティング =====
 +
 +==== 長時間実行プロセスを Ctrl + C で終了すると PowerShell が終了する ====
 +<WRAP prewrap 100% #result>
 +<code powershell>
 +PowerShell 7.0.2
 +Copyright (c) Microsoft Corporation. All rights reserved.
 +
 +https://aka.ms/powershell
 +Type 'help' to get help.
 +
 +PS C:\Users\nakayama> cd d:\wsl
 +PS D:\wsl> xz .\fedora.tar
 +
 +[プロセスはコード 3221225786 で終了しました]
 +</code>
 +</WRAP>
 +英語では以下のようにシェルが終了する。\\
 +<WRAP prewrap 100% #result>
 +<code powershell>
 +[process exited with code 3221225786]
 +</code>
 +</WRAP>
 +
 +設定 (settings.json) の **"source"** コメントアウトして、以下のように **"commandline"** にフルパス記述するように修正する。\\
 +<WRAP prewrap 100% #result>
 +<code javascript settings.json>
 +        "list":
 +        [
 +            {
 +                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
 +                "hidden": false,
 +                "name": "PowerShell Core",
 +                //"source": "Windows.Terminal.PowershellCore",
 +                "commandline": "%USERPROFILE%\\scoop\\apps\\powershell\\current\\pwsh.exe",
 +                "icon": "%USERPROFILE%\\scoop\\apps\\powershell\\current\\assets\\Powershell_av_colors.ico",
 +                "colorScheme": "Campbell",
 +                "startingDirectory" : "%USERPROFILE%"
 +            }
 +        ]
 +</code>
 +</WRAP>
 +
 +[[https://github.com/PowerShell/PowerShell/issues/11314|pwsh as a dotnet global tool exhibits very unusual behavior with Ctrl-C · Issue #11314 · PowerShell/PowerShell · GitHub]]\\
 +
 +==== バージョンアップ後にユーザー設定読み込みエラーが発生する ====
 +バージョンアップ後に以下のエラーが発生する。\\
 +<WRAP prewrap 100%>
 +<code>
 +ユーザー設定の読み込み中にエラーが発生しました
 +The "globals" property is deprecated - your settings might need updating. For more info, see this web page.
 +</code>
 +</WRAP>
 +[[https://go.microsoft.com/fwlink/?linkid=2128258|For more info, see this web page.]]\\
 +<WRAP prewrap 100%>
 +<code>
 +"globals" プロパティは廃止されました - 設定の更新が必要になる場合があります。詳細については、この Web ページを参照してください。
 +</code>
 +</WRAP>
 +{{windows:windows_terminal_settings_error_001.png?400|"globals" プロパティは廃止}}\\
 +
 +以下のような "globals" プロパティの場合\\
 +<WRAP prewrap 100% #mincode>
 +<code javascript profile.json>
 +{
 +    "$schema": "https://aka.ms/terminal-profiles-schema",
 +    
 +    "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
 +    
 +    "globals":
 +    {
 +        "initialCols" : 120,
 +        "initialRows" : 35
 +    },
 +    "profiles":
 +    {
 +        ...
 +    }
 +}
 +</code>
 +</WRAP>
 +
 +"globals" プロパティを削除して内容を "defaultProfile" と同一レベルに記述する。\\
 +<WRAP prewrap 100% #mincode>
 +<code javascript profile.json>
 +{
 +    "$schema": "https://aka.ms/terminal-profiles-schema",
 +    
 +    "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
 +    
 +    "initialCols" : 120,
 +    "initialRows" : 35,
 +    
 +    "profiles":
 +    {
 +        ...
 +    }
 +}
 +</code>
 +</WRAP>
 +
 +===== 参考文献 =====
 +[[https://github.com/microsoft/terminal/blob/master/doc/user-docs/index.md|Windows Terminal User Documentation]]\\
 +[[https://github.com/microsoft/terminal/blob/master/doc/user-docs/UsingJsonSettings.md|Editing Windows Terminal JSON Settings]]\\
 +\\
 +[[https://qiita.com/rubytomato@github/items/e88cab84f36e44797cf2|Windows Terminal (Preview) メモ - Qiita]]\\
 +[[https://qiita.com/tawara_/items/374f3ca0a386fab8b305|【文字幅 半角3:全角5 も追加】Ricty を神フォントだと崇める僕が、フリーライセンスのプログラミングフォント「白源」を作った話 - Qiita]]\\
 +[[https://qiita.com/whim0321/items/6a6b11dea54642bd6724|Windows Terminal Tips - Qiita]]\\
 +\\
 +[[https://docs.microsoft.com/ja-jp/windows/terminal/customize-settings/color-schemes|Windows ターミナルの配色 | Microsoft Docs]]\\
 +[[https://blog.shibata.tech/entry/2016/09/15/004354|PowerShellコンソールの表示色についてのちょっとした話 - しばたテックブログ]]\\
 +[[https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/write-host?view=powershell-7|Write-Host]]\\
 +[[https://stackoverflow.com/questions/56679782/how-to-use-ansi-escape-sequence-color-codes-for-psreadlineoption-v2-in-powershel|How to use ANSI escape sequence color codes for PSReadLineOption v2 in Powershell console? - Stack Overflow]]\\
 +[[https://www.gitmemory.com/DHowett-MSFT|DHowett-MSFT ( Dustin L. Howett (MSFT) )]]\\
 +\\
 +[[https://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal|command line - Print a 256-color test pattern in the terminal - Ask Ubuntu]]\\
  
  • windows/windows_terminal.1566167193.txt.gz
  • 最終更新: 2019/08/19 07:26
  • by ともやん