Memberi Warna Git Branch di Linux (Ubuntu, CentOS, dll)

Tambahkan tulisan berikut di file ~/.bashrc (/home/nama_user/.bashrc)

parse_git_branch() {
 git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}

color_prompt=yes

if [ "$color_prompt" = yes ]; then
 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
else
 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ '
fi


Komentar

  1. Caesars Casino and Racetrack – 2021 New Jersey Gambling
    Caesars 토토사이트 Resort Casino & Racetrack is the poormansguidetocasinogambling.com latest casino in New Jersey to undergo worrione a comprehensive safety review. The https://septcasino.com/review/merit-casino/ casino is owned by 바카라사이트 Caesars

    BalasHapus

Posting Komentar

Postingan populer dari blog ini

Checkout atau deploy ke website menggunakan git

Membuat script untuk backup semua database MariaDB dan MySQL