194d59fd43a8

Improve hgt.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sun, 31 Jan 2010 15:53:27 -0500
parents 060a976d718c
children f21315844a40
branches/tags (none)
files zsh/mercurial.zsh

Changes

--- a/zsh/mercurial.zsh	Sat Jan 30 13:27:36 2010 -0500
+++ b/zsh/mercurial.zsh	Sun Jan 31 15:53:27 2010 -0500
@@ -2,7 +2,8 @@
 
 alias mq='hg -R $(hg root)/.hg/patches'
 alias tmd="hg tmd -X '**fixtures**' | mate"
-alias hgt='hg log -vd "`date -j \"+%Y-%m-%d\"`" -u steve | grep "{t:"'
+alias calctime="sed -e 's/{t: *\([0-9]*\)*.*/\1/' | python -c 'import sys; print sum(map(int, sys.stdin.readlines())) / 60.0, \"hours\"'"
+alias hgt='hg log -vd "`date -j \"+%Y-%m-%d\"`" -u steve | grep "{t:" | calctime'
 
 function pull_everything() {
     for repo in $( ls -1 ); do