Windows-GITBASH-美化

Windows-GITBASH-美化

  • 引用自[Json的博客](http://www.fxjson.com/)

  • 为防止失效,备份如下

# git bash 终端执行

# 了解 vim 的执行如下
vim /etc/profile.d/git-prompt.sh
# 安装 vscode 的执行该操作
code /etc/profile.d/git-prompt.sh
 if test -f /etc/profile.d/git-sdk.sh
  then
      TITLEPREFIX=SDK-${MSYSTEM#MINGW}
  else
      TITLEPREFIX=$MSYSTEM
  fi

  if test -f ~/.config/git/git-prompt.sh
  then
      . ~/.config/git/git-prompt.sh
  else
      PS1='\[\033]0;Bash\007\]'      # 窗口标题
      PS1="$PS1"'\n'                 # 换行
      PS1="$PS1"'\[\033[32;1m\]'     # 高亮绿色
      PS1="$PS1"'➜ '               # unicode 字符,右箭头
      PS1="$PS1"'\[\033[33;1m\]'     # 高亮黄色
      PS1="$PS1"'\W'                 # 当前目录
      if test -z "$WINELOADERNOEXEC"
      then
          GIT_EXEC_PATH="$(git --exec-path 2>/dev/null)"
          COMPLETION_PATH="${GIT_EXEC_PATH%/libexec/git-core}"
          COMPLETION_PATH="${COMPLETION_PATH%/lib/git-core}"
          COMPLETION_PATH="$COMPLETION_PATH/share/git/completion"
          if test -f "$COMPLETION_PATH/git-prompt.sh"
          then
              . "$COMPLETION_PATH/git-completion.bash"
              . "$COMPLETION_PATH/git-prompt.sh"
              PS1="$PS1"'\[\033[31m\]'   # 红色
              PS1="$PS1"'`__git_ps1`'    # git 插件
          fi
      fi
      PS1="$PS1"'\[\033[36m\] '      # 青色
  fi

  MSYS2_PS1="$PS1"
  • 字体选择
JackInput, # 首选,需要下载 https://www.likefont.com/search/JackInput/font/
IBM-Courier-Bold
  • 配置终端字体

    设置终端选择添加字体与vscode渲染效果
    设置终端选择添加字体与vscode渲染效果
  • Vscode添加GIT BASH作为启动终端

 # 设置字体
 "editor.fontFamily": "JackInput,IBM-Courier-Bold,Consolas", // IBM Plex Mono
 # 终端选择 注意为安装目录下的 bin下的bash.exe
 "terminal.integrated.shell.windows": "D:\\DownLoad\\Git\\bin\\bash.exe"
  • Windows终端选择为最新的W..T..

    最终渲染
    最终渲染
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值