LoginSignup
0
1

More than 3 years have passed since last update.

WindowsTerminal (Preview)でGitBashを使用する

Posted at

はじめに

WindowsTerminlaのプレビュー版が、MicrosoftStoreで公開さたので、チョロチョロ遊んでみていますが本リリースが楽しみですね。
コマンドラインインターフェースもこれ一つに統合できそうですが、普段使っているGitBashはデフォルトで設定されないため、profiles.jsonに設定を追加してみました。

GitBashの追加

  1. Ctrl + , でprofiles.jsonを開く
  2. "profiles" : []に、GitBahs用のObjectを追加する。以下設定例
    {
    "acrylicOpacity" : 0.75,
    "colorScheme" : "Campbell",
    "commandline" : "C:\Program Files\Git\bin\bash.exe",
    "cursorColor" : "#FFFFFF",
    "cursorShape" : "bar",
    "fontFace" : "Consolas",
    "fontSize" : 11,
    "historySize" : 9001,
    "icon" : "C:\Program Files\Git\mingw64\share\git\git-for-windows.ico",
    "name" : "Git Bash",
    "padding" : "0, 0, 0, 0",
    "snapOnInput" : true,
    "startingDirectory" : "%USERPROFILE%",
    "useAcrylic" : false
    }

Pathに関しては自己環境に合わせてください。今回は、Gitインストール時についてくる、GitBash For Windowsを利用した場合の設定です。
/Git/git-bash.exeは、別Windowで立ち上がってしまうので、/Git/bin/bash.exeを利用しています。
不足している、Aliasは、/Git/etc/bash.bashrcに追加。

追加例
alias ll='ls --color=auto -al'
alias ls='ls -F --color=auto --show-control-chars'

おわりに

デフォルトをGitBashにしたい場合は、"globals"."defaultProfile"に対象プロファイルのguidを設定する。
guidは、保存時に自動で付与されます。
それでは、良いターミナルライフを。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1