diff --git a/git-heatmap b/git-heatmap index 8391a12..daf6b35 100755 --- a/git-heatmap +++ b/git-heatmap @@ -31,6 +31,11 @@ while [[ $# -gt 0 ]]; do shift shift ;; + -f|--filter) + FILTER="$2" + shift + shift + ;; -h) cat <, --base Compare relative to . If on , show heatmap for entire repo. [default: master] -c , --char Use to draw the bars. [default: █] + -f , --filter Filter output through before creating the + the histogram. -h Show this message. EOF exit @@ -59,6 +66,7 @@ LIMIT=${LIMIT:-30} REVIEW_BASE=${REVIEW_BASE:-master} CHAR=${CHAR:-█} WIDTH=${WIDTH:-60} +FILTER=${FILTER:-cat -} files() { # https://stackoverflow.com/questions/7577052/ @@ -76,6 +84,7 @@ color_name() { filter() { grep '.' | \ + eval "$FILTER" | \ sort | \ uniq -c | \ sort -nr | \