Solved Clear Scrollback and Reset

In Linux, when typing reset in the xfce terminal, the terminal was reset, that is, as if we had closed and opened a new window, without messages or commands.

In FreeBSD this command is not giving the result I expected, in practice it seems to do nothing! Below what he does
# reset
Erase is delete.

# tset
Erase is delete.

NOTE: CTRL + L or clear has nothing to do with my question!

I don't understand what changed in the reset command for FreeBSD. Is there anything else similar?
 
From the manual page:





It does something. Try this:

ls ; reset

The directory listing will not be in scrollback.
For me it didn't change anything, it listed the directory, so I pressed enter until the screen disappeared, and everything that was typed remains typed
 
What about reset + ^J

That is, type reset but instead of pressing <enter>, hold <ctrl> and press J.

Some more info on it here.
I created 10 lines used in the terminal. So I typed reset and pressed CTRL+J
CTRL+J performed the reset returning: Erase is delete.
But, all lines are still written in the terminal!
Nothing else happened!

Just remembering that the objective is for the terminal to look as if it had just been opened, that is, completely empty with just 1 line.
That's what happens when you type reset in Linux, it's as if you've opened a new, completely empty terminal!
 
What I found so far was:
option 1, type: printf '\033\143'
option 2, type: clear && printf '\033[3J'

option 3, Configure a shortcut
a.png
 
Add to the .shrc file in your home, the line:
alias clear="printf '\033\143'"

I'll put the post as resolved. This was the best solution I found, it is very quick. I chose the word "clear" because it's easy to remember, but you can use any word!
Thank you all!
 
Back
Top