summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-09-14 23:20:57 -0400
committerJune McEnroe <june@causal.agency>2021-09-14 23:20:57 -0400
commit4a84f2350e2cb90effd9e5fa3a7ed65b2da54b46 (patch)
tree5e9ae5fdd4684a3f8eae22a84def140ca6e7012d /bin
parentSwap-remove tags as they're found (diff)
downloadsrc-4a84f2350e2cb90effd9e5fa3a7ed65b2da54b46.tar.gz
src-4a84f2350e2cb90effd9e5fa3a7ed65b2da54b46.zip
Sort by title if authors match
There are probably better things to sort by but title definitely
always exists.
Diffstat (limited to 'bin')
-rw-r--r--bin/bibsort.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/bibsort.pl b/bin/bibsort.pl
index 0d132c19..a4a8956a 100644
--- a/bin/bibsort.pl
+++ b/bin/bibsort.pl
@@ -42,8 +42,9 @@ foreach $ref (@refs) {
 }
 
 sub byAuthor {
+	my ($ta, $tb) = ($a->{T}[0], $b->{T}[0]);
 	local ($a, $b) = ($a->{A}[0], $b->{A}[0]);
-	byLast();
+	byLast() || $ta cmp $tb;
 }
 
 {