1

The title says it all - i hate the default git bash look. Is there a way to quickly change a theme without using 3d-party terminal programs?

TheSmokingGnu
  • 302
  • 2
  • 6
  • 15
  • You can customize bash via `.bashrc` file, just as you do in ubuntu. See [this question](https://stackoverflow.com/questions/6883760/git-for-windows-bashrc-or-equivalent-config-files-for-git-bash-shell). – kowsky Oct 23 '17 at 13:23

1 Answers1

2

You can just modify your PS1 global variable. You can take a look on this variable doing

echo $PS1

You will see : code like \[\033[35m\] start a color style and this code specifically \[\033[0m\]\ ends the color.

__git_ps1 is the reference of your branch.

With gitbash, by default you have :

\[\033]0;$TITLEPREFIX:${PWD//[^[:ascii:]]/?}\007\]\n\[\033[32m\]\u@\h \[\033[35m\]$MSYSTEM \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n$

but you can do something like :

export PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]`__git_ps1`\[\033[0m\] \$> '

Put the previous line in your .bashrc: you can type this line in the prompt and go back typing >bash

Djory Krache
  • 347
  • 4
  • 9