Skip to content

Instantly share code, notes, and snippets.

@Leask
Last active May 15, 2018 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Leask/4153091 to your computer and use it in GitHub Desktop.
Save Leask/4153091 to your computer and use it in GitHub Desktop.
[DETACHED] Just another prompt with git infos and smile icons
RED="\[\033[31m\]"
GEN="\[\033[32m\]"
YEL="\[\033[33m\]"
OFF="\[\033[m\]"
NME="\u"
HST="\h"
DIR="\w"
DTE="`date`"
# TST="`date +%s`"
# LCT="[`whereami`]"
PMT="\`if [ $(id -u) = 0 ]; then echo ${YEL}# ❯$OFF; else echo ${YEL}$ ❯$OFF; fi\`"
# https://github.com/michaeldfallen/git-radar
# export GIT_RADAR_FETCH_TIME=30
export GIT_RADAR_COLOR_BRANCH='\033[32m' # Green
if [ -f /usr/local/bin/git-radar ]; then
GIT="\$(git-radar --bash --fetch)"
fi
if [ `uname` = 'Darwin' ]; then
HPY='😃'
SAD='😓'
else
HPY=':)'
SAD=':('
fi
MOD="\`if [ \$? = 0 ]; then echo ${HPY}; else echo ${SAD}; fi\`"
PS1="⎧ $DTE $MOD\n⎨ $NME@$RED$HST$OFF:$DIR$GIT\n⎩ $PMT "
@fundon
Copy link

fundon commented Dec 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment