Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added hgrc

  • Loading branch information...
commit a0fdae7c0d8ec1202c1eda71da56da750a23c2f0 1 parent 476d644
@jyurek authored
Showing with 32 additions and 2 deletions.
  1. +8 −1 bashrc
  2. +22 −0 hgrc
  3. +2 −1  install.sh
View
9 bashrc
@@ -6,6 +6,10 @@ function parse_git_branch {
git branch --no-color 2> /dev/null | grep \* | awk '{print $2}'
}
+function parse_hg_branch {
+ hg branch 2>/dev/null
+}
+
function latest_command {
history | tail -n 1 | sed 's/[0-9 ]*\(.*\)/\1/'
}
@@ -27,12 +31,15 @@ function prompt_command_function
titlebar_last_command="\[\e]2;$(latest_command)\a\]"
git_branch=$(parse_git_branch)
+ hg_branch=$(parse_hg_branch)
git_dirty= #$(parse_git_dirty)
+ hg_dirty=
git_dirty=${git_dirty:+" \[\e[31m\]$git_dirty\[\e[0m\]"}
git_branch=${git_branch:+" (\[\e[35m\]${git_branch}\[\e[0m\]${git_dirty})"}
+ hg_branch=${hg_branch:+" (\[\e[36m\]${hg_branch}\[\e[0m\]${hg_dirty})"}
- PS1="$titlebar_last_command$last_result \h:\[\e[32m\]\w\[\e[0m\] \u$git_branch\$ "
+ PS1="$titlebar_last_command$last_result \h:\[\e[32m\]\w\[\e[0m\] \u$git_branch$hg_branch\$ "
}
function gemcd {
View
22 hgrc
@@ -0,0 +1,22 @@
+[ui]
+username = Jon Yurek <jyurek@thoughtbot.com>
+
+[pager]
+pager = LESS='FSRX' less
+
+[extensions]
+pager =
+color =
+hgext.bookmarks =
+hggit =
+graphlog =
+
+[alias]
+show = log --color=always -pr
+
+[defaults]
+glog = --template '\033[4;31m{rev}\033[0m:\033[0;31m{node|short}\033[0m \033[0;36m{tags}\033[0m \033[0;37m{desc|firstline}\033[0m \033[0;34m{author|person}\033[0m \033[0;32m({date|age})\033[0m\n'
+log = --template '\033[4;31m{rev}\033[0m:\033[0;31m{node|short}\033[0m \033[0;36m{tags}\033[0m \033[0;37m{desc|firstline}\033[0m \033[0;34m{author|person}\033[0m \033[0;32m({date|age})\033[0m\n'
+
+[diff]
+git = True
View
3  install.sh
@@ -5,7 +5,7 @@ cd ~
# Don't clobber what's already there.
backupdir=.dotfiles/backup/$(date +%Y%m%d%H%M%S)
mkdir -p $backupdir
-cp .ackrc .bashrc .bash_profile .profile .gemrc .inputrc .gitconfig .gitignore .vim .vimrc .gvimrc $backupdir
+cp .ackrc .bashrc .bash_profile .profile .gemrc .inputrc .gitconfig .gitignore .vim .vimrc .gvimrc .hgrc $backupdir
# Move in.
ln -sf .dotfiles/ackrc .ackrc
@@ -16,6 +16,7 @@ ln -sf .dotfiles/gemrc .gemrc
ln -sf .dotfiles/inputrc .inputrc
ln -sf .dotfiles/gitconfig .gitconfig
ln -sf .dotfiles/gitignore .gitignore
+ln -sf .dotfiles/hgrc .hgrc
ln -sf .dotfiles/vim .vim
ln -sf .vim/vimrc .vimrc
ln -sf .vim/gvimrc .gvimrc
Please sign in to comment.
Something went wrong with that request. Please try again.