Created
December 7, 2015 10:05
-
-
Save CBeloch/53666c1ea1c226ec17a3 to your computer and use it in GitHub Desktop.
My tuned .bash_profile for OS X
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
# Activate colors | |
export CLICOLOR='true' | |
export LSCOLORS="gxfxcxdxbxCgCdabagacad" | |
export EDITOR=vi | |
# Git branch in good-looking prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
# Prompt with Git branch | |
# "<Folder> <Git Branch> $ " | |
export PS1='\[$(tput setaf 3)\]\w\[$(tput setaf 1)\]$(parse_git_branch)\[$(tput sgr0)\] $ ' | |
# Bonus track: SSH autocompleting hostnames, write ssh and press tab | |
complete -W "$(while read line; do echo ${line%%[, ]*}; done < ~/.ssh/known_hosts)" ssh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment