mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:17:46 +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:
parent
8f91a47aeb
commit
cc7e3519a6
6 changed files with 25 additions and 8 deletions
1
Userland/.gitignore
vendored
1
Userland/.gitignore
vendored
|
@ -11,3 +11,4 @@ true
|
|||
hostname
|
||||
cat
|
||||
uname
|
||||
clear
|
||||
|
|
|
@ -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
8
Userland/clear.cpp
Normal file
|
@ -0,0 +1,8 @@
|
|||
#include <LibC/stdio.h>
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
printf("\033[3J\033[H\033[2J");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue