æ¬è¨äºã§ã¯ãWindows 10 ä¸ã«ã¤ã³ã¹ãã¼ã«æ¸ã® MinGW/MSYS (1.0) ã®ã¿ã¼ããã«ã¨ãã¥ã¬ã¼ã¿ã¨ãã¦ããã¤ã¯ãã½ãã製ã®ãæ°ãã Windows Terminalã (The new Windows Terminal) ã使ç¨ããæ¹æ³ãç´¹ä»ãã¾ããæ°ãã Windows Terminal ã¯ã2019å¹´ã«ãªãªã¼ã¹ããããã¤ã¯ãã½ãã製ã®æ°ããã¿ã¼ããã«ã¨ãã¥ã¬ã¼ã¿ã§ãã
æ°ãã Windows Terminal ã®ã¤ã³ã¹ãã¼ã«ï¼
Microsoft Store ãèµ·åããå³ä¸ã®æ¤ç´¢æ¬ã«ãWindows Terminalãã¨å ¥åã㦠Preview ãä»ããªãæ¹ãé¸ã³ãMicrosoft Corporation 製ã§ããäºã確èªãã¤ã³ã¹ãã¼ã«ãã¾ãã2021å¹´3æç¾å¨ã§ã¯ããªãªã¼ã¹çã®ãã¼ã¸ã§ã³ã 1.6ãPreview çã®ãã¼ã¸ã§ã³ã 1.7 ã¨ãªã£ã¦ãã¾ãã
è¨å®ãã¡ã¤ã« ( .json) ã®ç·¨éï¼
Windows Terminal ãèµ·åããã¿ã¼ããã«ä¸é¨ãã¼ã®ã¿ãã®é£ã«æãä¸åãã®ãã©ã±ãã (å°ã£ãæ¬å¼§) ãæ¼ãã¦ã¡ãã¥ã¼ãã¼ãéããè¨å®ãé¸ã³ã¾ãã
ã.jsonããã¡ã¤ã« (å®éã®ãã¡ã¤ã«å㯠settings.json ) ããã¡ã¢å¸³ãã§éãã¾ãã
Â
ãâprofilesâ:ãæã®ä¸ã®ä¸æ¬å¼§ (ã«ã¼ãªã¼ãã©ã±ãã { } ) ã§å§ã¾ããããã¯ã®ä¸ã®ãæ´ã«ã"list":ãæã®ä¸ã®åè§æ¬å¼§ ( [ ] ) ã§å§ã¾ããªã¹ãã®ä¸ã«ãä¸è¨ã®ï¼ãããã¯ãä»ãå ãã¾ããé »ç¹ã«ä½¿ããªããªã¹ãã®ï¼çªç®ã¨ããã®ãè¯ãã§ããããå°ã// ããè¡æ«ã¾ã§ã¯ã³ã¡ã³ãã¨ãªãã¾ãã
ã"guid"ãè¡ã¯å¿ ãããå¿ é ã§ã¯ããã¾ããããWindows Terminal ã®ããã©ã«ãã¨ã㦠MSYS ã® bash ãèµ·åãããå ´åã«ã¯å¿ é ã¨ãªãã¾ããããã«ã¤ãã¦ã¯æ¬¡ã®è¦åºãã§èª¬æãã¾ããä¸è¨ã®ä¾ã§ã¯æªã ã³ã¡ã³ãã¢ã¦ããã¦ããã¾ãã
ãã®ä¾ã§ã¯è¿½å ã®ãªãã·ã§ã³è¨å®ã¨ãã¦ããã©ã³ãã«å¥éã¤ã³ã¹ãã¼ã«æ¸ã® DejaVu ã®16 ãã¤ã³ãããã«ã¼ã½ã«å½¢ç¶ã«å¤ªãä¸ç· (vintage) ãè¨å®ãã¦ãã¾ããããããã®è¡ãå¿ é ã§ã¯æãã¾ãããã«ã¼ã½ã«å½¢ç¶ã¯ã"bar" ( â ), "vintage" ( â ), "underscore" ( â ), "filledBox" ( â ), "emptyBox" ( ⯠), "doubleUnderscore" ( â ) ã®ä¸ããé¸ã³ã¾ãã
{
// Make changes here to the MSYS profile.
// "guid": "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}",
"hidden": false,
"name": "MSYS",
"icon": "C:\\MSYS\\m.ico",
"commandline": "C:\\MSYS\\bin\\bash --login -",
"fontFace": "DejaVu Sans Mono",
"fontSize": 16,
"cursorShape": "vintage"
},
ä¸æ㪠GUID ã®åå¾ï¼
Windows Terminal ã®ããã©ã«ãã¨ã㦠MSYS ã® bash ãèµ·åãããå ´åã«ã¯ãå°ç¨ã«ä¸æ㪠GUID ã®åå¾ãå¿ è¦ã¨ãªãã¾ããWindows PowerShell ãèµ·åãã次ã®ã³ãã³ããæã¡ã¾ãã
[Guid]::NewGuid()
 ããã¨èªåã®ãã½ã³ã³å ã§ä¸æ㪠GUID ã表示ããã¾ãã®ã§ããããä¸è¨ .json ãã¡ã¤ã«ã® XXXX ã®é¨åã«ã³ãã¼ï¼ãã¼ã¹ããã¾ããçµäºãããè¡ã®å é ã® // ã®ã³ã¡ã³ãã¯å¤ãã¾ãã
Windows Terminal èµ·åæã®ããã©ã«ãã®åãæ¿ãï¼
Windows Terminal ãã¤ã³ã¹ãã¼ã«ããç´å¾ã®ç¶æ ã§ã¯ãããã©ã«ãã§èµ·åããã®ã¯ PowerShell ã«ãªã£ã¦ãã¾ãã.json ãã¡ã¤ã«ã®ä¸ã®æ¹ã«è¨è¼ããã¦ãã "defaultProfile" ã®è¡ããå ç¨ MSYS ã® bash ç¨ã«è¨å®ããå¤ã«å¤æ´ãã¾ããä¸è¨ã®ä¾ã§ã¯ãPowerShell ã®è¨å®ãã³ã¡ã³ãã¢ã¦ãããç§ã®ãã½ã³ã³å°ç¨ã«æ°ãã«åå¾ãã MSYS ã® GUID ã«å ¥ãæ¿ãã¦å± ã¾ããã¾ããè¦ãããæ§ã«è¡æ«ã« // ã§å§ã¾ãã³ã¡ã³ããå ¥ãã¦å± ã¾ãã
 // "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", // PowerShell
"defaultProfile": "{26dd098c-a22e-4e5d-90f1-800ebc20fd49}", // MSYS
MSYS å´ã§ã®è¨å®ï¼
MSYS å´ã§å¹¾ã¤ãã®è¨å®ããã¦ããå¿ è¦ãæãã¾ãã
- LANG ç°å¢å¤æ°ã®æåã³ã¼ãã SJIS ã«è¨å®ãã¦ãããªãã¨ãman ãã¼ã¸ã®è¡¨ç¤ºãä¹±ããããvim ã¹ã¯ãªã¼ã³ ã¨ãã£ã¿ãæ£ããåããªãã£ãããã¾ã
~/.profile ã®ä¸ã§æ¬¡ã®è¨å®ããã¦ããã¾ãã
export LANG=C.SJIS
好ã¿ã«ãããGCC ã®ã¨ã©ã¼è¡¨ç¤ºã«æ¥æ¬èªãå¸æã®å ´å㯠ja_JP.SJIS ã¨ãã¾ãã - ls ã³ãã³ãã« alias ãè¨å®ã㦠--show-control-char ã®æå®ããã¦ãããªãã¨ããã¡ã¤ã«åã®æ¥æ¬èªã表示åºæ¥ã¾ããã次ã®è¨å®ã ~/.profile ããå¼ã³åºã ~/.bashrc ã«è¨è¼ããããããã㯠~/.profie ã«ç´æ¥è¨è¼ãã¾ããåè
ãæ¨å¥¨ãã¾ãã
alias ls='/bin/ls --show-control-char'
- TERM ç°å¢å¤æ°ã¯èªå㧠cygwin ã«è¨å®ããã¾ãããåé¡æãã¾ããã/etc/termcap ã«ã¯ãã®ã¨ã³ããªãåå¨ãã¾ãã
åèãµã¤ãï¼
Windows Terminal ã®ãå¤è¦³ (Appearance)ãã®è¨å®ã«é¢ããããã¤ã¯ãã½ããã®å ¬å¼ãªè§£èª¬ã¯æ¬¡ã®ãµã¤ãã§ãã
ãã©ãã«ã·ã¥ã¼ãã£ã³ã°ã®ãµã¤ãã¯ãæ¥æ¬èªã§ãã
ã¾ããDejaVu ãã©ã³ãã®å
¬å¼ãµã¤ãã¯æ¬¡ã®éãã§ãããDownloadãã®ãã¼ã¸ã«è¡ãããdejavu-fonts-ttf-X.xx.zipãããã¦ã³ãã¼ãããZIP ãã¡ã¤ã«ãå±éããå¾ãã.ttfããå³ã¯ãªãã¯ãã¦ã¤ã³ã¹ãã¼ã«ãã¾ãã