Last active
February 28, 2016 04:56
-
-
Save TyOverby/03feebe8c75b999250cd to your computer and use it in GitHub Desktop.
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
| export PATH="$PATH:$HOME/.cargo/bin" | |
| export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/lib" | |
| set_fg() | |
| { | |
| printf "\001\e[38;5;${1}m\002" | |
| } | |
| set_bg() | |
| { | |
| printf "\001\e[48;5;${1}m\002" | |
| } | |
| reset() | |
| { | |
| printf "\e[0m" | |
| } | |
| prompt() | |
| { | |
| # Current directory | |
| set_fg 38 | |
| set_bg 237 | |
| printf "${PWD/#$HOME/\~}" | |
| # Git branch | |
| set_fg 37 | |
| declare -f __git_ps1 > /dev/null && __git_ps1 | |
| # Separator | |
| set_bg 235 | |
| printf " " | |
| # Whitespace | |
| reset | |
| echo -en " " | |
| } | |
| PS1='$(prompt)' | |
| mytitle="" | |
| echo -e '\001\033]2;'$mytitle'\007\002' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment