Skip to content

Instantly share code, notes, and snippets.

@trapd00r
Created March 19, 2021 13:58
Show Gist options
  • Save trapd00r/505872c83e8f4eddf3b8e7503dce46bf to your computer and use it in GitHub Desktop.
Save trapd00r/505872c83e8f4eddf3b8e7503dce46bf to your computer and use it in GitHub Desktop.
[alias]
last = "!git log -10 HEAD --abbrev-commit --date=short --pretty=format:'%h%x00%cd%x00%s%x00%an%x00%d' $@ | gawk -F '\\0' '{ printf \"\\033[31m%s\\033[m \\033[32m%s\\033[m %-.40s \\033[30;1m%s\\033[m\\033[33m%s\\n\", $1, $2, gensub(/(.{49}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5 }';"
lastt = "!git log -76 HEAD --abbrev-commit --date=short --pretty=format:'%h%x00%cd%x00%s%x00%an%x00%d' $@ | gawk -F '\\0' '{ printf \"\\033[31m%s\\033[m \\033[32m%s\\033[m %-.40s \\033[30;1m%s\\033[m\\033[33m%s\\n\", $1, $2, gensub(/(.{49}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5 }';"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment