新しい Windows ターミナルに新しいターミナル (Git Bash) を追加しようとしていますが、うまく動作しません。
commandline
配列内のプロパティprofiles
を に変更しようとしましたgit-bash.exe
が、うまくいきませんでした。
これを機能させる方法を誰か知っていますか?
ベストアンサー1
概要
- Ctrl+で設定を開く,
- 以下のプロファイル オプションのいずれか (インストールされている git のバージョンによって異なります) をファイル
"list":
のこの部分に追加する必要がありますsettings.json
。
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{00000000-0000-0000-ba54-000000000001}",
"profiles":
{
"defaults":
{
// Put settings here that you want to apply to all profiles
},
"list":
[
<put one of the configuration below right here>
]
}
}
プロフィールオプション
commandline
およびを使用している場合は、正しいパスのコメントを解除しますicon
。
- Windows用のGit
%PROGRAMFILES%
- Windows用のGit
%USERPROFILE%
- 使用している場合スクープ
{
"guid": "{00000000-0000-0000-ba54-000000000002}",
"commandline": "%PROGRAMFILES%/Git/bin/bash.exe -i -l",
// "commandline": "%USERPROFILE%/AppData/Local/Programs/Git/bin/bash.exe -l -i",
// "commandline": "%USERPROFILE%/scoop/apps/git/current/usr/bin/bash.exe -l -i",
"icon": "%PROGRAMFILES%/Git/mingw64/share/git/git-for-windows.ico",
// "icon": "%USERPROFILE%/AppData/Local/Programs/Git/mingw64/share/git/git-for-windows.ico",
// "icon": "%USERPROFILE%/scoop/apps/git/current/usr/share/git/git-for-windows.ico",
"name" : "Bash",
"startingDirectory" : "%USERPROFILE%"
},
次のような他のオプションを追加することもできます:
{
"guid": "{00000000-0000-0000-ba54-000000000002}",
// ...
"acrylicOpacity" : 0.75,
"closeOnExit" : true,
"colorScheme" : "Campbell",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "Consolas",
"fontSize" : 10,
"historySize" : 9001,
"padding" : "0, 0, 0, 0",
"snapOnInput" : true,
"useAcrylic" : true
}
ノート
- あなた自身の
guid
ものを作るhttps://github.com/microsoft/terminal/pull/2475これはもう生成されません。 - は>
guid
で使用できるので、Windowsターミナルを起動するか押すと、デフォルトでbashが起動します。globals
defaultProfile
CtrlShiftT
"defaultProfile" : "{00000000-0000-0000-ba54-000000000001}",
-l -i
.bash_profile
確実にロードされるように- 環境変数を使用して、さまざまなシステムに正しくマップできるようにします。
git/bin/bash.exe
追加のプロセスを生成するという犠牲を払って環境が正しく渡されることを保証するためのターゲット。git/usr/bin/bash.exe
同じように動作しますが、git
パスには入りません。
私はScoopを使っている設定を持っています出典: trajano