Created
February 6, 2016 04:41
-
-
Save florapdx/379000692be7b11aad1d to your computer and use it in GitHub Desktop.
basic prompt configs
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
## Environment customizations | |
# Add Sublime Text 2 as default editor | |
export EDITOR="/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" | |
## Alias cd up-level | |
alias cd..="cd .." | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." | |
alias .....="cd ../../../.." | |
alias ......="cd ../../../../.." | |
## PS1 Prompt customizations: | |
function parse_git_branch() { | |
x=`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'` | |
if [[ "$x" == "" ]]; then | |
echo "" | |
else | |
echo "$x " | |
fi | |
} | |
export PROMPT_COMMAND='export OLD_STATUS=$?' | |
export PS1='\[\033[1;35m\]\h \[\033[0;30m\]\d \[\033[0;30m\]\A \[\033[1;30m\]\W \[\033[0;30m\]`parse_git_branch` \[\033[0;30m\]`if [ $OLD_STATUS = 0 ]; then echo \♡; else echo \♥; fi` \[\033[1;33m\]\$ \[\033[0m\]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment