Last active
August 14, 2020 01:22
-
-
Save afeijo/8601619 to your computer and use it in GitHub Desktop.
My colored linux prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# download me or copy & paste into your root folder, name it .ps1_color | |
# add the line below into your ~/.profile or ~/.bashrc | |
# source ~/.ps1_color | |
# ANSI color codes | |
RS="\[\033[0m\]" # reset | |
HC="\[\033[0;1m\]" # hicolor | |
UL="\[\033[4m\]" # underline | |
INV="\[\033[7m\]" # inverse background and foreground | |
FBLK="\[\033[30m\]" # foreground black | |
FRED="\[\033[1;31m\]" # foreground red | |
FGRN="\[\033[32m\]" # foreground green | |
FYEL="\[\033[33m\]" # foreground yellow | |
FBLE="\[\033[1;34m\]" # foreground blue | |
FMAG="\[\033[35m\]" # foreground magenta | |
FCYN="\[\033[36m\]" # foreground cyan | |
FWHT="\[\033[37m\]" # foreground white | |
BBLK="\[\033[40m\]" # background black | |
BRED="\[\033[41m\]" # background red | |
BGRN="\[\033[42m\]" # background green | |
BYEL="\[\033[43m\]" # background yellow | |
BBLE="\[\033[44m\]" # background blue | |
BMAG="\[\033[45m\]" # background magenta | |
BCYN="\[\033[46m\]" # background cyan | |
BWHT="\[\033[47m\]" # background white | |
PS1="$HC${debian_chroot:+($debian_chroot)}$FCYN\t $FRED\u@$FGRN\h $FBLE\w$BBLK$FYEL\$(__git_ps1 ' [%s]')$RS\$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment