プロジェクト

全般

プロフィール

VSCodeのシェルをMSYS2にする » 履歴 » リビジョン 3

リビジョン 2 (開発 次郎, 2025/03/23 10:59) → リビジョン 3/5 (開発 次郎, 2025/03/23 11:07)

h1. VSCodeのシェルをMSYS2にする 

 h2. 概要 

 統合ターミナルを起動する際にMSYS2プロファイルを選択するには、<code>terminal.integrated.profiles.windows</code> を <code>settings.json</code> に追加する。 

 h3. settings.jsonにMSYS2を追加する 

 "PowerShell", "Command Prompt", "Git Bash" がデフォルト部分で、"MSYS2 Bash" が追加した個所 

 <pre><code class="json"> 
     "terminal.integrated.profiles.windows": { 

         "PowerShell": { 
             "source": "PowerShell", 
             "icon": "terminal-powershell" 
         }, 
         "Command Prompt": { 
             "path": [ 
                 "${env:windir}\\Sysnative\\cmd.exe", 
                 "${env:windir}\\System32\\cmd.exe" 
             ], 
             "args": [], 
             "icon": "terminal-cmd" 
         }, 
         "Git Bash": { 
             "source": "Git Bash" 
         }, 
		 "MSYS2 Bash": { 
			 "path": [ 
				 "D:\\msys64\\usr\\bin\\bash.exe" 
			 ], 
			 "args": [ 
				 "--login" 
			 ], 
			 "env": { 
				 "MSYSTEM": "MINGW64", 
				 "CHERE_INVOKING": "1" 
			 } 
		 }, 
     } 
 </code></pre> 

 h2. 参考 

 * "Visual Studio Code の統合ターミナルで MSYS2 の bash を選択できるようにする":https://qiita.com/chirimen/items/04e2e10c86c9ecd1e158