shithub: bin.rc

Download patch

ref: 32dae5e4a11c5d7876ce45d221930f84d37e83e2
parent: 0caade8a5f4d1d80802fc47b1777336af7aee37e
author: kvik <[email protected]>
date: Thu May 14 06:48:05 EDT 2020

Replace isatty with iscons (simplified, more useful)

--- /dev/null
+++ b/bin/iscons
@@ -1,0 +1,7 @@
+#!/bin/rc
+rfork e
+
+fd = $1
+if(~ $#fd 0)
+	fd = 0
+exec grep -s ' /dev/cons$' /fd/^$fd^ctl