Created
August 31, 2013 17:08
-
-
Save billcotter/6399499 to your computer and use it in GitHub Desktop.
.bashrc
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
PROMPT_COMMAND='DIR=`pwd|sed -e "s!$HOME!~!"`; if [ ${#DIR} -gt 30 ]; then CurDir=${DIR:0:12}...${DIR:${#DIR}-15}; else CurDir=$DIR; fi' | |
# show git branch name in prompt | |
PS1='\[\e[1;32m\]\u: $CurDir $(__git_ps1 " (%s)")\$\[\e[0m\] ' | |
# make bash autocomplete with up arrow | |
bind '"\e[A":history-search-backward' | |
bind '"\e[B":history-search-forward' | |
# make tab cycle through commands instead of listing | |
bind '"\t":menu-complete' | |
bind "set completion-ignore-case on" | |
# git completion | |
# uses https://gist.github.com/2273507 | |
source ~/scripts/git-completion.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment