shithub: bin.rc

ref: 17ffc25b2303538e71895e660fce6640d5b1dc3b
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