Last active
June 22, 2017 03:44
-
-
Save dapierce/620a100ec9eeb30384514b45f9bf90dd to your computer and use it in GitHub Desktop.
My custom .bash_profile for macOS
This file contains 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
# oldbashprofile: | |
#export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " | |
# πππ cool stuff πππ | |
# randomize emoji/colors every new terminal window tab | |
emojis=(π― π· π΅ πΌ πΊ π π π― π π₯ π π₯) | |
emoji=${emojis[$RANDOM % 12]} | |
# if in a git repo, show the branch | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
# on fire if previous command failed | |
function success { | |
if [ $? == 0 ]; | |
then | |
echo $emoji | |
else | |
echo π₯ | |
fi | |
} | |
export PS1="\e[48;5;50m \$(success)\e[30;48;5;50m \t \033[m\]\[\033[36m\] \u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\] \w\[\033[m\] \e[3;93m\$(parse_git_branch)\e[0m\n\$ " | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
#alias ls='ls -GFh' | |
# Setting PATH for Python 3.6 | |
# The original version is saved in .bash_profile.pysave | |
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}" | |
export PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment