Skip to content

Commit

Permalink
+ alias: lastn: lasttt with optional count arg, lasttt is now 30
Browse files Browse the repository at this point in the history
we very commonly do "git lasttt -30", so much so that, instead of using
"git lasttt" to mean "display arbitrarily many, and allow another
argument such as the count", we'll instead make it mean "display 30",
and change the "arbitrarily many" to a "lastn" which takes a number
argument and display that many.  if not provided, no argument will be
given, meaning it's the same as lasttt used to be (and has the advantage
of being one less character in the no-count case, and two less in the
count-provided case ("lasttt -100" -> "lastn 100").
  • Loading branch information
smemsh committed Apr 12, 2024
1 parent f9e9e48 commit ded9855
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aliases
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ contains = merge-base --is-ancestor

#
last = log -1 HEAD
lasttt = log --oneline
lastn = "!f(){ git log --oneline ${1:+-$1}; }; f"
lasttt = log --oneline -30
lastt = log --oneline -10
lastfew = log --oneline -3
lastone = log --oneline -1
Expand Down

0 comments on commit ded9855

Please sign in to comment.