shithub: bin.rc

Download patch

ref: 92d3d9d1a431f20df9ce8d3d42ac7fb428281a01
parent: c30e1e6ba0303b7d50cbfb13686e69db0a512bdf
author: kvik <[email protected]>
date: Sat Apr 18 22:25:09 EDT 2020

clear: fix usage, exit-on-error

--- a/bin/clear
+++ b/bin/clear
@@ -1,7 +1,8 @@
-#!/bin/rc
+#!/bin/rc -e
 rfork e
-flagfmt = 'a:clearall'
-eval `{aux/getflags} || aux/usage
+flagfmt = 'a:clearall'; args = ''
+eval `{aux/getflags $*} || aux/usage
+
 if(~ $clearall 1)
 	>/dev/text && exit
 </dev/text sed '/^'^$prompt(1)^'/q' | sed '$d' >/tmp/clear