fixed sed command so it works on non-Macs

This commit is contained in:
Joe Fleming
2012-10-16 16:10:14 -07:00
parent aaba57aa61
commit 08f811dd5f

View File

@@ -29,9 +29,11 @@ show_git_head() {
pretty_git_log() {
git log --graph --pretty="tformat:${FORMAT}" $* |
# Replace (2 years ago) with (2 years)
sed -Ee 's/(^[^<]*) ago)/\1)/' |
#sed -Ee 's/(^[^<]*) ago)/\1)/' |
sed -e 's/ ago//' |
# Replace (2 years, 5 months) with (2 years)
sed -Ee 's/(^[^<]*), [[:digit:]]+ .*months?)/\1)/' |
#sed -Ee 's/(^[^<]*), [[:digit:]]+ .*months?)/\1)/' |
sed -e 's/(^[^<]*), [[:digit:]]+ .*months?)/)/' |
# Line columns up based on } delimiter
column -s '}' -t |
# Page only if we need to