git: 9front

Download patch

ref: b6d477c2e3e0589f1cff9aa03e2c51a287947baa
parent: 1de5d1f1addb86445324728255ceab078cc8277d
author: Jacob Moody <moody@posixcafe.org>
date: Wed Sep 28 20:51:24 EDT 2022

bar: leave last aux on screen on eof

This allows a static aux with:
echo 'a | b' | bar | ...

--- a/sys/src/cmd/bar.c
+++ b/sys/src/cmd/bar.c
@@ -200,9 +200,9 @@
 	Binit(&b, 0, OREAD);
 	for(;;){
 		s = Brdstr(&b, '\n', 1);
-		sendp(c, s ? s : strdup(""));
 		if(s == nil)
 			break;
+		sendp(c, s);
 	}
 	Bterm(&b);
 
--