Created
May 14, 2014 15:59
-
-
Save afknapping/ef9d0fb753fde7bf33ae to your computer and use it in GitHub Desktop.
bash aliases for wtf did i do today (and yesterday)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias wtf-did-i-do-yesterday="echo '' && echo 'wtf did i do yesterday?' && echo '' && git log --pretty=format:'%Cred%h%Creset - %s%Creset - %Cgreen%cd%Creset ' --date=relative --all --since=2.days.ago --until=1.day.ago --author=\"$(git config user.name)\"" | |
alias wtf-did-i-do-today="echo '' && echo 'wtf did i do today?' && echo '' && git log --pretty=format:'%Cred%h%Creset - %s%Creset - %Cgreen%cd%Creset ' --date=relative --all --since=6am --author=\"$(git config user.name)\"" | |
# the aliases need escaped double quotes | |
# to try the commands directly, copy this and paste into your terminal: | |
# echo '' && echo 'wtf did i do today?' && echo '' && git log --pretty=format:'%Cred%h%Creset - %s%Creset - %Cgreen%cd%Creset ' --date=relative --all --since=6am --author="$(git config user.name)" |
Sure they are from 1 day ago? The command reads "--since=2.days.ago --until=1.day.ago", so it shows stuff from 2 days ago as well - works like that here.
the original idea was to have a list of commits for the morning daily, so the the timestamps would normally not go below 24 hours.
but that wouldn't show anything from yesterday if i check it in the morning...
@romanbloeth is right, i think it should be --since=yesterday --until=6am
Anyway, big thx to you, @filtercake, as this is really a very nice and handy alias for my everyday use from now on! Great idea!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
true, the relative dates seem to have a breakpoint somewhere in the "30s of hours ago" where they switch to "2 days ago".
the original idea was to have a list of commits for the morning daily, so the the timestamps would normally not go below 24 hours.