shithub: bin.rc

ref: 4f4b767fae09a76152d777ca1b5372218d6e5ff9
dir: /bin/clear/

View raw version
#!/bin/rc -e
rfork e
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
cat /tmp/clear >/dev/text