Note:Show git branch in bash prompt
![圖片](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmsv40Hbl137JHH4Ymrprt90oxf65TJgRp9XoDQgp5PYLBKMOOX4_xrYyczD4ihYpQUTN5wR3jdDRoRgNcU0qtcDrYq75yKekNIpUdpLjeDHOtkIuA4-HbcACn806C2-PBnF1HrEq8sLLCYWmkfZzL4wGKckSoBrIrZ56hYV0-XUElSMBM0gxh/w640-h50/%E8%9E%A2%E5%B9%95%E5%BF%AB%E7%85%A7%202024-02-26%2015-52-10.png)
Reference: How to show current git branch with colors in Bash prompt https://thucnc.medium.com/how-to-show-current-git-branch-with-colors-in-bash-prompt-380d05a24745 vim ~/.bashrc parse_git_branch () { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' } if [ " $color_prompt " = yes ]; then # PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' PS1 = "\[\033[01;32m\]\u@\h\[\033[00m\]: \[\e[32m\]\w \[\e[91m\] \$ (parse_git_branch)\[\e[00m\]$ " else mirochiu@mirochiu-d820mt: /mnt/hdd2/node.repo/linebot_speech (master)$ c