【问题标题】:Bash Ubuntu for Windows, use colour scheme from Git BashBash Ubuntu for Windows,使用来自 Git Bash 的配色方案
【发布时间】:2017-06-06 01:35:25
【问题描述】:

我已经在我的机器上重新安装了适用于 Windows 的 Ubuntu,并且我还使用了 Git Bash。除了设置别名之外,我想让终端 (Bash) 复制 Git Bash 使用的相同配色方案,以及终端中的分支名称。

我怎样才能做到这一点?

【问题讨论】:

    标签: bash ubuntu terminal git-bash


    【解决方案1】:

    Windows 版 git 使用与 git/git 相同的 contrib/completion/git-prompt.sh 脚本。

    因此,请确保按照“Displaying git branch name in prompt does not work in screen”中的说明:

    • 确保脚本在/etc/bash_completion.d
    • source /etc/bash_completion.d/git-prompt(或者至少从你的~/.bashrc获取它:它可以在你的~/.bash_profile中引用)

    【讨论】:

      猜你喜欢
      • 2017-05-02
      • 2020-10-06
      • 1970-01-01
      • 2015-11-17
      • 1970-01-01
      • 2012-11-20
      • 2018-04-17
      • 1970-01-01
      • 2016-04-18
      相关资源
      最近更新 更多