Created
September 28, 2016 14:50
-
-
Save mycargus/dd3b0b8dece927c758e579a24f2b4fda to your computer and use it in GitHub Desktop.
My custom BASH prompt. Add this to your .bashrc file or wherever you like to keep these things. :)
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
function prompt { # from http://dobsondev.com/customizing-your-terminal/ | |
local BLACK="\[\033[0;30m\]" | |
local BLACKBOLD="\[\033[1;30m\]" | |
local RED="\[\033[0;31m\]" | |
local REDBOLD="\[\033[1;31m\]" | |
local GREEN="\[\033[0;32m\]" | |
local GREENBOLD="\[\033[1;32m\]" | |
local YELLOW="\[\033[0;33m\]" | |
local YELLOWBOLD="\[\033[1;33m\]" | |
local BLUE="\[\033[0;34m\]" | |
local BLUEBOLD="\[\033[1;34m\]" | |
local PURPLE="\[\033[0;35m\]" | |
local PURPLEBOLD="\[\033[1;35m\]" | |
local CYAN="\[\033[0;36m\]" | |
local CYANBOLD="\[\033[1;36m\]" | |
local WHITE="\[\033[0;37m\]" | |
local WHITEBOLD="\[\033[1;37m\]" | |
local RESETCOLOR="\[\e[00m\]" | |
export GITAWAREPROMPT=~/.bash/git-aware-prompt | |
source $GITAWAREPROMPT/main.sh | |
#export PS1="\u@\h \w \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ " | |
export SUDO_PS1="\[$bakred\]\u@\h\[$txtrst\] \w\$ " | |
export GIT_PS1_SHOWDIRTYSTATE=1 # Show dirty state in prompt when in Git repos | |
export PS1="\n$RED\u $PURPLE@ $GREEN\W \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\] \n $BLUE[\#] \$ $RESETCOLOR" | |
export PS2="| → $RESETCOLOR" | |
} | |
prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment