Skip to content

Instantly share code, notes, and snippets.

@pyrtsa
Created November 1, 2011 04:22
Show Gist options
  • Save pyrtsa/1329930 to your computer and use it in GitHub Desktop.
Save pyrtsa/1329930 to your computer and use it in GitHub Desktop.
This should fix some issues with https://gist.github.com/1327258
[alias]
l50 = "!git log --abbrev-commit --date=short --pretty=format:'%h%x00%cd%x00%s%x00%an%x00%d' $@ | gawk -F '\\0' '{ printf \"\\033[31m%s\\033[0m \\033[32m%s\\033[0m %-50s \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, gensub(/(.{49}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5 }' | less -R"
l80 = "!git log --abbrev-commit --date=short --pretty=format:'%h%x00%cd%x00%s%x00%an%x00%d' $@ | gawk -F '\\0' '{ printf \"\\033[31m%s\\033[0m \\033[32m%s\\033[0m %-80s \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, gensub(/(.{79}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5 }' | less -R"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment