ref: 0f994b1b09c1dddd2d48c479dd025e71a674fd31
parent: ab7fe19ae264aa569f6298b73492d4b3e733e0b0
author: cinap_lenrek <[email protected]>
date: Fri Oct 11 23:18:44 EDT 2013
aux/statusbar: emit final newline in textmode when finished bad: term% echo 1 1 | aux/statusbar -t x |###########################################################| 100% term% vs. good: term% echo 1 1 | aux/statusbar -t x |###########################################################| 100% term%
--- a/sys/src/cmd/aux/statusbar.c
+++ b/sys/src/cmd/aux/statusbar.c
@@ -152,7 +152,10 @@
d = strtoll(f[1], 0, 0);
drawbar();
}
- postnote(PNPROC, child, "kill");
+ if(textmode)
+ write(1, "\n", 1);
+ else
+ postnote(PNPROC, child, "kill");
}