cmd/mbf: improve title format

This is cleaner for long-running daemon processes, and the additional information is more intuitive.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
cat
2026-08-08 13:10:18 +09:00
parent 3c1a6f0793
commit d236c9eaf7
+6 -2
View File
@@ -136,15 +136,19 @@ func (cache *cache) open() (err error) {
var n, nc uint64 var n, nc uint64
for enter := range notify { for enter := range notify {
if enter { if enter {
n++
nc++ nc++
} else { } else {
nc-- nc--
n++
} }
if nc == 0 {
writeTitle(cache.msg, prefix[:len(prefix)-1])
continue
}
writeTitle(cache.msg, prefix+ writeTitle(cache.msg, prefix+
"("+strconv.FormatUint(nc, 10)+ "("+strconv.FormatUint(nc, 10)+
" of "+strconv.FormatUint(n, 10)+")") " running, "+strconv.FormatUint(n, 10)+" complete)")
} }
}() }()
} }