1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:17:35 +00:00

Add a /bin/clear that prints the clear terminal escape sequence.

It doesn't work yet, but it will!
This commit is contained in:
Andreas Kling 2018-10-27 17:39:08 +02:00
parent 8f91a47aeb
commit cc7e3519a6
6 changed files with 25 additions and 8 deletions

1
Userland/.gitignore vendored
View file

@ -11,3 +11,4 @@ true
hostname
cat
uname
clear

View file

@ -10,7 +10,8 @@ OBJS = \
false.o \
hostname.o \
cat.o \
uname.o
uname.o \
clear.o
APPS = \
id \
@ -24,7 +25,8 @@ APPS = \
false \
hostname \
cat \
uname
uname \
clear
ARCH_FLAGS =
STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib
@ -80,6 +82,9 @@ cat: cat.o
uname: uname.o
$(LD) -o $@ $(LDFLAGS) $< ../LibC/LibC.a
clear: clear.o
$(LD) -o $@ $(LDFLAGS) $< ../LibC/LibC.a
.cpp.o:
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<

8
Userland/clear.cpp Normal file
View file

@ -0,0 +1,8 @@
#include <LibC/stdio.h>
int main(int, char**)
{
printf("\033[3J\033[H\033[2J");
return 0;
}