diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-08-08 13:10:18 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-08-08 13:10:18 +0900 |
| commit | d236c9eaf79da25529497621d097a9bfac08d4b4 (patch) | |
| tree | bbfa336d8bb0d49d4793a2bc98fd3a0815d41856 /cmd | |
| parent | 3c1a6f0793aa5d907eca6e41971fe8fafe19b3aa (diff) | |
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>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/mbf/cache.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cmd/mbf/cache.go b/cmd/mbf/cache.go index 5a4b9672..847d7d4e 100644 --- a/cmd/mbf/cache.go +++ b/cmd/mbf/cache.go @@ -136,15 +136,19 @@ func (cache *cache) open() (err error) { var n, nc uint64 for enter := range notify { if enter { - n++ nc++ } else { nc-- + n++ } + if nc == 0 { + writeTitle(cache.msg, prefix[:len(prefix)-1]) + continue + } writeTitle(cache.msg, prefix+ "("+strconv.FormatUint(nc, 10)+ - " of "+strconv.FormatUint(n, 10)+")") + " running, "+strconv.FormatUint(n, 10)+" complete)") } }() } |
