fixed up git branch display and colors in bashrc. ignored NerdTreeBookmarks. Updated git config to use vim for core editor
parent
49adb03341
commit
89071d3826
20
.bashrc
20
.bashrc
|
|
@ -66,6 +66,22 @@ LIGHTYELLOW="\[\033[38;5;229m\]"
|
||||||
CONTINUE="\[\033[38;5;242m\]"
|
CONTINUE="\[\033[38;5;242m\]"
|
||||||
DARKGRAY="\[\033[38;5;247m\]"
|
DARKGRAY="\[\033[38;5;247m\]"
|
||||||
|
|
||||||
|
|
||||||
|
parse_git_branch () {
|
||||||
|
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
|
||||||
|
}
|
||||||
|
|
||||||
|
parse_git_tag () {
|
||||||
|
git describe --tags 2> /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
parse_git_branch_or_tag() {
|
||||||
|
local OUT="$(parse_git_branch)"
|
||||||
|
if [ "$OUT" == " ((no branch))" ]; then
|
||||||
|
OUT="($(parse_git_tag))";
|
||||||
|
fi
|
||||||
|
echo $OUT
|
||||||
|
}
|
||||||
# [hh:mm] username@host (git branch || svn revision) ~/working/directory
|
# [hh:mm] username@host (git branch || svn revision) ~/working/directory
|
||||||
# $
|
# $
|
||||||
# [hh:mm] username@host (git branch || svn revision) ~/working/directory
|
# [hh:mm] username@host (git branch || svn revision) ~/working/directory
|
||||||
|
|
@ -73,10 +89,10 @@ DARKGRAY="\[\033[38;5;247m\]"
|
||||||
# Pretty ugly hack for msys... need to figure out how to determine if my
|
# Pretty ugly hack for msys... need to figure out how to determine if my
|
||||||
# console is 256 color capable
|
# console is 256 color capable
|
||||||
if [ $OSTYPE = 'msys' ]; then
|
if [ $OSTYPE = 'msys' ]; then
|
||||||
PS1="$GREEN[\$(date +%H:%M)] \u@\h $RED $YELLOW\w \n$EMPTY\$ $GRAY"
|
PS1="$GREEN[\$(date +%H:%M)] \u@\h $RED$(parse_git_branch_or_tag) $YELLOW\w \n\$ $GRAY"
|
||||||
PS2="$CONTINUE> "
|
PS2="$CONTINUE> "
|
||||||
else
|
else
|
||||||
PS1="$LIGHTBLUE[\$(date +%H:%M)] \u@\h $LIGHTRED $LIGHTYELLOW\w \n$EMPTY\$ $DARKGRAY"
|
PS1="$LIGHTBLUE[\$(date +%H:%M)] \u@\h $LIGHTRED$(parse_git_branch_or_tag) $LIGHTYELLOW\w \n$EMPTY\$ $DARKGRAY"
|
||||||
PS2="$CONTINUE> "
|
PS2="$CONTINUE> "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
# Make `git rebase` safer on OS X
|
# Make `git rebase` safer on OS X
|
||||||
# More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/>
|
# More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/>
|
||||||
trustctime = false
|
trustctime = false
|
||||||
editor = vim
|
editor = gvim
|
||||||
|
|
||||||
[color]
|
[color]
|
||||||
# Use colors in Git commands that are capable of colored output when
|
# Use colors in Git commands that are capable of colored output when
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
*.kdbx
|
*.kdbx
|
||||||
_*
|
_*
|
||||||
.vim_colorv_cache
|
.vim_colorv_cache
|
||||||
.NERDTreeBookmars
|
.NERDTreeBookmarks
|
||||||
*.log
|
*.log
|
||||||
*.exe
|
*.exe
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue