From f4e7d13ca96bb1a73cfeb6aa189ec3aa35756178 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Thu, 30 May 2024 16:38:18 +0200 Subject: [PATCH] Runic.main: add some pretty dots. --- src/main.jl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main.jl b/src/main.jl index edac0da..8e9bc3d 100644 --- a/src/main.jl +++ b/src/main.jl @@ -228,10 +228,16 @@ function main(argv) if print_progress input_pretty = relpath(inputfile) if check - printstyled(stderr, "Checking `$(input_pretty)` ... "; color = :blue) + str = "Checking `$(input_pretty)` " + ndots = 80 - textwidth(str) - 1 - 1 + dots = ndots > 0 ? "."^ndots : "" + printstyled(stderr, str, dots, " "; color = :blue) else - to = output_is_samefile ? "" : "-> `$(relpath(output))` " - printstyled(stderr, "Formatting `$(inputfile)` $(to) ... "; color = :blue) + to = output_is_samefile ? " " : " -> `$(relpath(output))` " + str = "Formatting `$(inputfile)`$(to)" + ndots = 80 - textwidth(str) - 1 - 1 + dots = ndots > 0 ? "."^ndots : "" + printstyled(stderr, str, dots, " "; color = :blue) end end