History

list: show user name headers

There were a lot of repos on shithub (Thanks sigrid), so it was getting harder to scan for a single user. Add usernames when listing user dirs, for simpler scanning of the list.

Ori Bernstein committed 5 years ago

Commit 653a66d1 parent 5dfaaea1 file · +11 −2Browse files

Unified · Split

shithub+11−2
@@ -84,9 +84,14 @@ switch($1){ · 83 unmodified lines
84case 'list'84case 'list'
85 rfork m85 rfork m
86 prelude Repolist86 prelude Repolist
87 echo ' <h1>Repos</h1>87 echo ' <h1>Repos</h1>'
88 <dl>'88 udir=()
89 for(repo in `$nl{ls */}){89 for(repo in `$nl{ls */}){
90 ndir=`{basename -d $repo}
91 if(! ~ $udir $ndir){
92 echo '<h3>'$ndir'</h3>'
93 echo '<dl>'
94 }
90 if(test -e $repo/.git/webpublish){95 if(test -e $repo/.git/webpublish){
91 echo '<dt><a href="/git/'$repo'/HEAD/info.html">'$repo'</a></dt>'96 echo '<dt><a href="/git/'$repo'/HEAD/info.html">'$repo'</a></dt>'
92 echo '<dd>'97 echo '<dd>'
@@ -98,6 +103,10 @@ case 'list' · 5 unmodified lines
98 echo 'code some guy wrote'103 echo 'code some guy wrote'
99 echo '</dd>'104 echo '</dd>'
100 }105 }
106 if(! ~ $udir $ndir){
107 echo '</dl>'
108 udir=$ndir
109 }
101 }110 }
102 echo '</dl>'111 echo '</dl>'
103 112