Commit 4b7a42dfb4

4b7a42dfb419b6cc402066b19c1452d7fd05ec1b

parent: 037e004e54

Verified · cmc

cmc <hello@cleberg.net> · 2026-09-24 04:32 UTC

view: every sub-table under a section label

Ref #254

Layout: unified · split

internal/control/adminhost.go +1 −1
@@ -333,7 +333,7 @@ func runAdminStats(c *Ctx, args []string) int {
333 "lfs", humanBytes(d.LFSBytes), 333 "lfs", humanBytes(d.LFSBytes),
334 ) 334 )
335 if len(d.Repos) > 0 { 335 if len(d.Repos) > 0 {
336 io.WriteString(w, "\n") 336 v.section("repos")
337 tb := c.table(w, "PATH", "BYTES") 337 tb := c.table(w, "PATH", "BYTES")
338 for _, r := range d.Repos { 338 for _, r := range d.Repos {
339 tb.row(cRef(r.Path), cText(humanBytes(r.Bytes))) 339 tb.row(cRef(r.Path), cText(humanBytes(r.Bytes)))
internal/control/deps.go +1 −1
@@ -122,7 +122,7 @@ func runDepsStatus(c *Ctx, args []string) int {
122 "tracked in", tracked, 122 "tracked in", tracked,
123 ) 123 )
124 if len(out.Behind) > 0 { 124 if len(out.Behind) > 0 {
125 io.WriteString(w, "\n") 125 v.section("behind")
126 tb := c.table(w, "ECOSYSTEM", "NAME", "CURRENT", "LATEST") 126 tb := c.table(w, "ECOSYSTEM", "NAME", "CURRENT", "LATEST")
127 for _, b := range out.Behind { 127 for _, b := range out.Behind {
128 tb.row(cText(b.Ecosystem), cRef(b.Name), cText(b.Current), cText(b.Latest)) 128 tb.row(cText(b.Ecosystem), cRef(b.Name), cText(b.Current), cText(b.Latest))
internal/control/mr.go +1 −1
@@ -790,7 +790,7 @@ func runMRShow(c *Ctx, args []string) int {
790 v.body(d.Body, d.BodyFormat) 790 v.body(d.Body, d.BodyFormat)
791 791
792 if len(commits) > 1 { 792 if len(commits) > 1 {
793 io.WriteString(w, "\n") 793 v.section("commit")
794 tb := c.table(w, "SHA", "SUBJECT") 794 tb := c.table(w, "SHA", "SUBJECT")
795 for _, cm := range commits { 795 for _, cm := range commits {
796 tb.row(cRef(fmt.Sprintf("%.10s", cm.SHA)), cFlex(cm.Subject)) 796 tb.row(cRef(fmt.Sprintf("%.10s", cm.SHA)), cFlex(cm.Subject))
internal/control/org.go +1 −1
@@ -140,7 +140,7 @@ func runOrgShow(c *Ctx, args []string) int {
140 v := c.view(w) 140 v := c.view(w)
141 v.title(d.Org, "", "") 141 v.title(d.Org, "", "")
142 if len(ms) > 0 { 142 if len(ms) > 0 {
143 io.WriteString(w, "\n") 143 v.section("members")
144 tb := c.table(w, "USER", "ROLE") 144 tb := c.table(w, "USER", "ROLE")
145 for _, m := range ms { 145 for _, m := range ms {
146 tb.row(cRef(m.User), cState(m.Role)) 146 tb.row(cRef(m.User), cState(m.Role))
internal/control/release.go +1 −1
@@ -310,7 +310,7 @@ func runReleaseShow(c *Ctx, args []string) int {
310 ) 310 )
311 v.body(d.Notes, d.NotesFormat) 311 v.body(d.Notes, d.NotesFormat)
312 if len(d.Assets) > 0 { 312 if len(d.Assets) > 0 {
313 io.WriteString(w, "\n") 313 v.section("assets")
314 tb := c.table(w, "NAME", "SIZE", "SHA256") 314 tb := c.table(w, "NAME", "SIZE", "SHA256")
315 for _, a := range d.Assets { 315 for _, a := range d.Assets {
316 tb.row(cRef(a.Name), cNum(a.Size), cFlex(a.SHA256)) 316 tb.row(cRef(a.Name), cNum(a.Size), cFlex(a.SHA256))
internal/control/snippet.go +1 −1
@@ -231,7 +231,7 @@ func runSnippetShow(c *Ctx, args []string) int {
231 "url", snippetURL(c, sn), 231 "url", snippetURL(c, sn),
232 ) 232 )
233 if len(files) > 0 { 233 if len(files) > 0 {
234 io.WriteString(w, "\n") 234 v.section("files")
235 tb := c.table(w, "NAME", "SIZE") 235 tb := c.table(w, "NAME", "SIZE")
236 for _, f := range files { 236 for _, f := range files {
237 tb.row(cRef(f.Name), cText(fmt.Sprintf("%d bytes", f.Size))) 237 tb.row(cRef(f.Name), cText(fmt.Sprintf("%d bytes", f.Size)))
internal/control/teams.go +1 −1
@@ -190,7 +190,7 @@ func runTeamShow(c *Ctx, args []string) int {
190 v.title(org.Name+"/"+team.Name, "", "") 190 v.title(org.Name+"/"+team.Name, "", "")
191 v.fields("members", strings.Join(members, ", ")) 191 v.fields("members", strings.Join(members, ", "))
192 if len(grants) > 0 { 192 if len(grants) > 0 {
193 io.WriteString(w, "\n") 193 v.section("grants")
194 tb := c.table(w, "REPO", "ROLE") 194 tb := c.table(w, "REPO", "ROLE")
195 for _, g := range grants { 195 for _, g := range grants {
196 tb.row(cRef(g.RepoPath), cState(g.Role)) 196 tb.row(cRef(g.RepoPath), cState(g.Role))